<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Увеличение окна GUI по мере ввода текста]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18421&amp;type=atom" />
	<updated>2025-04-07T17:25:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18421</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Увеличение окна GUI по мере ввода текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162202#p162202" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong><br />Попробуйте поудалять цифры бэкспейсом.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2025-04-07T17:25:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162202#p162202</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Увеличение окна GUI по мере ввода текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162201#p162201" />
			<content type="html"><![CDATA[<p>Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2025-04-07T15:37:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162201#p162201</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Увеличение окна GUI по мере ввода текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162200#p162200" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Gui, +AlwaysOnTop +ToolWindow hwndMainWin -dpiscale
Gui, Color, F5F5F5
Gui, Font, S11, Tahoma
Gui, Add, Edit, w250 vn number hwndhEdit
Gui, Font, s11, Tahoma
Gui, Add, Text, vGuiText1 y43 x16 w303 ,  ;+0x201
obj := {h: hEdit}
obj.f := fn := Func(&quot;SetDots&quot;).Bind(obj)
GuiControl, +g, %hEdit%, % fn
Gui, Show,,
GuiControlGet,H,Pos,GuiText1
GuiControl, , GuiText1,
WinGetPos, X, Y, Width, Height, ahk_id %MainWin%
global MainWin,HH,Height
Return

GuiClose:
  ExitApp
  return

SetDots(obj)  {
  GuiControl, -g, % obj.h
  GuiControlGet, num,, % obj.h
  num := StrReplace(num, &quot; &quot;)

  n := num
  n:=RegExReplace(n,&quot;0&quot;, &quot;ноль`n&quot;)
  n:=RegExReplace(n,&quot;1&quot;, &quot;один`n&quot;)
  n:=RegExReplace(n,&quot;2&quot;, &quot;два`n&quot;)
  n:=RegExReplace(n,&quot;3&quot;, &quot;три`n&quot;)
  n:=RegExReplace(n,&quot;4&quot;, &quot;четыре`n&quot;)
  n:=RegExReplace(n,&quot;5&quot;, &quot;пять`n&quot;)
  n:=RegExReplace(n,&quot;6&quot;, &quot;шесть`n&quot;)
  n:=RegExReplace(n,&quot;7&quot;, &quot;семь`n&quot;)
  n:=RegExReplace(n,&quot;8&quot;, &quot;восемь`n&quot;)
  n:=RegExReplace(n,&quot;9&quot;, &quot;девять`n&quot;)

  GuiControl, , GuiText1, %n%

  static c
  c++
  WinMove, ahk_id %MainWin%,,,,,% Height+HH*c
  GuiControlGet,Pos,Pos,GuiText1
  GuiControl,Move,GuiText1,% &quot;h&quot; PosH+HH*c

  GuiControl,, % obj.h, % RegExReplace(num, &quot;\d(?=(\d{3})+$)&quot;, &quot;$0 &quot;)
  Send {End}
  fn := obj.f
  GuiControl, +g, % obj.h, % fn
}

esc::exitapp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2025-04-07T12:39:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162200#p162200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Увеличение окна GUI по мере ввода текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162199#p162199" />
			<content type="html"><![CDATA[<p>Следующий код преобразует цифры в слова в окне GUI. После ввода 5-строки, высота окна остается фиксированной. Как добавить возможность увеличения окна вниз, по мере ввода?<br /></p><div class="codebox"><pre><code>Gui, +AlwaysOnTop +ToolWindow hwndMainWin
Gui, Color, F5F5F5
Gui, Font, S11, Tahoma
Gui, Add, Edit, w250 vn number hwndhEdit
Gui, Font, s11, Tahoma
Gui, Add, Text, vGuiText1 y43 x16 w303 h84  ;+0x201
obj := {h: hEdit}
obj.f := fn := Func(&quot;SetDots&quot;).Bind(obj)
GuiControl, +g, %hEdit%, % fn
Gui, Show,, 
Return

GuiClose:
   ExitApp

SetDots(obj)  {
   GuiControl, -g, % obj.h
   GuiControlGet, num,, % obj.h
   num := StrReplace(num, &quot; &quot;)

   n := num
   n:=RegExReplace(n,&quot;0&quot;, &quot;ноль`n&quot;)
   n:=RegExReplace(n,&quot;1&quot;, &quot;один`n&quot;)
   n:=RegExReplace(n,&quot;2&quot;, &quot;два`n&quot;)
   n:=RegExReplace(n,&quot;3&quot;, &quot;три`n&quot;)
   n:=RegExReplace(n,&quot;4&quot;, &quot;четыре`n&quot;)
   n:=RegExReplace(n,&quot;5&quot;, &quot;пять`n&quot;)
   n:=RegExReplace(n,&quot;6&quot;, &quot;шесть`n&quot;)
   n:=RegExReplace(n,&quot;7&quot;, &quot;семь`n&quot;)
   n:=RegExReplace(n,&quot;8&quot;, &quot;восемь`n&quot;)
   n:=RegExReplace(n,&quot;9&quot;, &quot;девять`n&quot;)

   GuiControl, , GuiText1, %n%

   GuiControl,, % obj.h, % RegExReplace(num, &quot;\d(?=(\d{3})+$)&quot;, &quot;$0 &quot;)
   Send {End}
   fn := obj.f
   GuiControl, +g, % obj.h, % fn
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2025-04-06T19:40:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162199#p162199</id>
		</entry>
</feed>
