<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Обновляющийся текст в окне GUI]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=6724</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6724&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Обновляющийся текст в окне GUI».]]></description>
		<lastBuildDate>Sun, 15 May 2016 20:27:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103818#p103818</link>
			<description><![CDATA[<p>Здравствуйте. Помогите пожалуйста.<br /></p><div class="codebox"><pre><code>
; блок переменных
...
; конец блока
Gui, ; настройки и прочие элементы первого окна

Gui, 2: ; настройки и прочие элементы второго окна

; подпрограмма с телом сценария
sub_main:
...
return
</code></pre></div><p>В первом окне управляющие элементы, задающие настройки и общий характер поведения сценария, а во втором своего рода лог, в котором отображается содержимое нужных переменных из &quot;sub_main&quot;. Вероятно, это должна быть отформатированная символом &quot;`n&quot; строка, предварительно собранная из нужных данных, но что-то как не пытался применить материал выше - не получается. Гугль тоже не помог. Подскажите пожалуйста реализацию.</p><p>Несколько позже:</p><p>Разобрался через:<br /></p><div class="codebox"><pre><code>
ControlSetText, Static1, % OutputVar2, % &quot;ahk_id&quot;hGUI2
</code></pre></div><p>Если я правильно понял, &quot;Static1&quot; - это первый контейнер GUI указанного в его хендле последним параметром. Если не затруднит, поделитесь пожалуйста ссылкой, где об этом подробно написано.</p>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Sun, 15 May 2016 20:27:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103818#p103818</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55986#p55986</link>
			<description><![CDATA[<p>Впрочем, — пропустим это, не важно...</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 24 Jan 2012 22:24:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55986#p55986</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55985#p55985</link>
			<description><![CDATA[<p>Нет, <strong>ypppu</strong>,&nbsp; — если попытаетесь вникнуть в суть моей просьбы, увидите, что с самого начала веду речь об одном и том же.<br />Я не наглею (хочется в это верить <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />).</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 24 Jan 2012 22:10:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55985#p55985</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55984#p55984</link>
			<description><![CDATA[<p>А теперь построй-ка мне избу! (c) <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 24 Jan 2012 21:33:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55984#p55984</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55981#p55981</link>
			<description><![CDATA[<p><img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Если утомил не сильно, <strong>Grey</strong>, — возможно будет устранить возникающую ошибку из первого поста, сохранив последовательность таймеров-обращений и без необходимости создания нового подтаймера (в идеале — оставив стартовый таймер и переменную в строке<br /></p><div class="codebox"><pre><code>Gui, Add, Text,w74 Center vNow gNowEvent, %A_Now%</code></pre></div><p>без изменений)?<br />Дело в том, что специфика предстоящего использования фрагмента не допустит других комбинаций (двух таймеров и тд).</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 24 Jan 2012 19:49:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55981#p55981</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55978#p55978</link>
			<description><![CDATA[<div class="codebox"><pre><code>...
Timer:
   GuiControl,, Now, % A_Hour &quot;:&quot;A_Min &quot;.&quot;A_Sec &quot;`n&quot;OutputVar

;обращение/получение
;   GuiControlGet, OutputVar2,, Now
;   GuiControlGet, OutputVar2,, Static1
;   ControlGetText, OutputVar2, % Now, % &quot;ahk_id&quot;hGUI
   ControlGetText, OutputVar2, Static1, % &quot;ahk_id&quot;hGUI

;вывод
;   GuiControl, 2:, Now2, % OutputVar2
;   GuiControl, 2:, Static1, % OutputVar2
;   ControlSetText, % Now2, % OutputVar2, % &quot;ahk_id&quot;hGUI2
   ControlSetText, Static1, % OutputVar2, % &quot;ahk_id&quot;hGUI2
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Tue, 24 Jan 2012 14:13:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55978#p55978</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55967#p55967</link>
			<description><![CDATA[<p><strong>Grey</strong>, а осуществима ли такая последовательность: сначала обращение к подпрограмме по таймеру, — затем получение-вывод текста (без создания дополнительного подтаймера)?<br />И спасибо за долготерпение <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 24 Jan 2012 07:36:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55967#p55967</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55963#p55963</link>
			<description><![CDATA[<div class="codebox"><pre><code>DetectHiddenWindows, On
FormatTime, OutputVar,, ShortDate
SysGet, Workspace, MonitorWorkArea
Gui, +AlwaysOnTop -Caption +ToolWindow HwndhGUI
Gui, Color, 00833F
Gui, Font, s7 Bold cFFFF00
Gui, Add, Text, vNow w75 h26 Center
Gui, Show, Hide
Gui, 2: +AlwaysOnTop +ToolWindow -SysMenu HwndhGUI2
;Gui, 2: Add, Text, vNow2 w75 h26 Center
Gui, 2: Add, Text, w75 h26 Center
Gui, 2: Show, AutoSize, Same Title
WinGetPos, GUIX, GUIY, GUIWidth, GUIHeight, % &quot;ahk_id&quot;hGUI
NewX:=WorkSpaceRight-GUIWidth-26
NewY:=WorkspaceBottom-GUIHeight-0
Gui, Show, % &quot;Hide x&quot;NewX &quot; y&quot;NewY
SetTimer, Timer, 1000
DllCall(&quot;AnimateWindow&quot;, &quot;UInt&quot;, hGUI
                       , &quot;Int&quot;, 950
                       , &quot;UInt&quot;, 0x80000)
Return
 
Timer:
   GuiControl,, Now, % A_Hour &quot;:&quot;A_Min &quot;.&quot;A_Sec &quot;`n&quot;OutputVar

;   GuiControlGet, OutputVar2,, Now
;   GuiControlGet, OutputVar2,, Static1
;   ControlGetText, OutputVar2, % Now, % &quot;ahk_id&quot;hGUI
   ControlGetText, OutputVar2, Static1, % &quot;ahk_id&quot;hGUI

;   GuiControl, 2:, Now2, % OutputVar2
;   GuiControl, 2:, Static1, % OutputVar2
;   ControlSetText, % Now2, % OutputVar2, % &quot;ahk_id&quot;hGUI2
   ControlSetText, Static1, % OutputVar2, % &quot;ahk_id&quot;hGUI2
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Tue, 24 Jan 2012 06:40:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55963#p55963</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55957#p55957</link>
			<description><![CDATA[<p>Нужно циклично получать в переменную меняющийся заголовок определённого конкретного окна (у меня для примера — &quot;%A_Now%&quot;), и выводить содержимое полученной переменной в GUI.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 24 Jan 2012 03:39:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55957#p55957</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55955#p55955</link>
			<description><![CDATA[<p>Извини, мне не понятно, что за &quot;заголовок&quot;, какой &quot;проверкой&quot;?...</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Tue, 24 Jan 2012 03:20:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55955#p55955</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55952#p55952</link>
			<description><![CDATA[<p><strong>Grey</strong>, кажется, не совсем подходит — вместо переменной текущего времени, на практике предполагалось считывать меняющийся заголовок (проверкой по таймеру), с последующим выводом значения в GUI-окно.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 24 Jan 2012 02:35:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55952#p55952</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55948#p55948</link>
			<description><![CDATA[<div class="codebox"><pre><code>DetectHiddenWindows, On
FormatTime, OutputVar,, ShortDate
SysGet, Workspace, MonitorWorkArea
Gui, +AlwaysOnTop -Caption +ToolWindow HwndhGUI
Gui, Color, 00833F
Gui, Font, s7 Bold cFFFF00
Gui, Add, Text, vNow w75 h26 Center
Gui, Show, Hide
WinGetPos, GUIX, GUIY, GUIWidth, GUIHeight, % &quot;ahk_id&quot;hGUI
NewX:=WorkSpaceRight-GUIWidth-26
NewY:=WorkspaceBottom-GUIHeight-0
Gui, Show, % &quot;Hide x&quot;NewX &quot; y&quot;NewY
SetTimer, Timer, 1000
Return

Timer:
   GuiControl,, Now, % A_Hour &quot;:&quot;A_Min &quot;.&quot;A_Sec &quot;`n&quot;OutputVar
   DllCall(&quot;AnimateWindow&quot;, &quot;UInt&quot;, hGUI
                          , &quot;Int&quot;, 250
                          , &quot;UInt&quot;, 0x80000)
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Tue, 24 Jan 2012 00:29:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55948#p55948</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Обновляющийся текст в окне GUI]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=55947#p55947</link>
			<description><![CDATA[<p>Подскажите, как наладить меняющийся по таймеру текст?</p><div class="codebox"><pre><code>#SingleInstance Force
DetectHiddenWindows, on

  SetTimer, Timer, 3000
  Return

Timer:
  SysGet, Workspace, MonitorWorkArea 
  Gui, default 
  Gui, -Caption +ToolWindow +LastFound +AlwaysOnTop
  Gui, Color, 00833F
  Gui, Font, s7 bold cFFFFFF
  Gui, Add, Text,w74 Center vNow gNowEvent, %A_Now%

  Gui, Show, Hide 
  GUI_ID := WinExist() 
  WinGetPos, GUIX, GUIY, GUIWidth, GUIHeight, ahk_id %GUI_ID% 
  NewX := WorkSpaceRight-GUIWidth-26
  NewY := WorkspaceBottom-GUIHeight-0 
  Gui, Show, Hide x%NewX% y%NewY%

  DllCall(&quot;AnimateWindow&quot;,&quot;UInt&quot;,GUI_ID,&quot;Int&quot;,500,&quot;UInt&quot;,&quot;0x00040008&quot;)
  Return

NowEvent:
  ;GuiControl, , Now, % A_Now
  ;DllCall(&quot;AnimateWindow&quot;,&quot;UInt&quot;,GUI_ID,&quot;Int&quot;,1000,&quot;UInt&quot;,&quot;0x90000&quot;) ; Fade out
  Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Mon, 23 Jan 2012 21:47:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=55947#p55947</guid>
		</item>
	</channel>
</rss>
