<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: ListLines в реальном времени]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=15655</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=15655&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: ListLines в реальном времени».]]></description>
		<lastBuildDate>Thu, 17 Sep 2020 22:14:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142180#p142180</link>
			<description><![CDATA[<p><strong>Botsy</strong></p><p>Как вариант - написать Gui окошко и выводить текст в него.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Thu, 17 Sep 2020 22:14:22 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142180#p142180</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142164#p142164</link>
			<description><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p><strong>Botsy</strong></p><p>Можно установить как запуск по клавише, затем когда нужно отследить, что делает скрипт - нажать эту клавишу и начнётся отображение истории.</p></blockquote></div><p>Спасибо, разобрался. А можно сделать вывод не поверх всех окон ? <br /></p><div class="codebox"><pre><code>
ListLinesOutput(Text) { 
	ToolTip % LastLines(Text, 66), 0, 0, 2
}
</code></pre></div><p>Вроде надо этот tooltip заменить, только на что ?</p>]]></description>
			<author><![CDATA[null@example.com (Botsy)]]></author>
			<pubDate>Thu, 17 Sep 2020 06:54:32 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142164#p142164</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142129#p142129</link>
			<description><![CDATA[<p><strong>Botsy</strong></p><p>Можно установить как запуск по клавише, затем когда нужно отследить, что делает скрипт - нажать эту клавишу и начнётся отображение истории.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Mon, 14 Sep 2020 15:18:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142129#p142129</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142127#p142127</link>
			<description><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Выводит последние 66 строк.</p></blockquote></div><p> Спасибо за ответ, правда я так и не разобрался как это работает и как это применить.</p>]]></description>
			<author><![CDATA[null@example.com (Botsy)]]></author>
			<pubDate>Mon, 14 Sep 2020 12:52:08 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142127#p142127</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142055#p142055</link>
			<description><![CDATA[<p>Выводит последние 66 строк.<br /></p><div class="codebox"><pre><code>
SetTimer, ListLines, 333

loop
{
	If !Mod(A_Index, 4)
		Sleep 1
	Sleep 111
} 

ListLinesOutput(Text) { 
	ToolTip % LastLines(Text, 66), 0, 0, 2
}

LastLines(Haystack, Lines) { 
	If (1, StrReplace(Haystack, &quot;`n&quot;, , c)) &amp;&amp; (r := c - Lines + 1) &gt; 0
		Haystack := SubStr(Haystack, InStr(Haystack, &quot;`n&quot;, , , r) + 1)
	Return Haystack
}

ListLines() {
	Static hwndEdit, pSFW, pSW, bkpSFW, bkpSW
	ListLines Off
	
	if !hwndEdit
	{
		; Retrieve the handle of our main window&#039;s Edit control:
		dhw := A_DetectHiddenWindows
		DetectHiddenWindows, On
		Process, Exist
		ControlGet, hwndEdit, Hwnd,, Edit1, ahk_class AutoHotkey ahk_pid %ErrorLevel%
		DetectHiddenWindows, %dhw%
		
		astr := A_IsUnicode ? &quot;astr&quot; : &quot;str&quot;
		hmod := DllCall(&quot;GetModuleHandle&quot;, &quot;str&quot;, &quot;user32.dll&quot;)
		; Get addresses of these two functions:
		pSFW := DllCall(&quot;GetProcAddress&quot;, &quot;uint&quot;, hmod, astr, &quot;SetForegroundWindow&quot;)
		pSW := DllCall(&quot;GetProcAddress&quot;, &quot;uint&quot;, hmod, astr, &quot;ShowWindow&quot;)
		; Make them writable:
		DllCall(&quot;VirtualProtect&quot;, &quot;uint&quot;, pSFW, &quot;uint&quot;, 8, &quot;uint&quot;, 0x40, &quot;uint*&quot;, 0)
		DllCall(&quot;VirtualProtect&quot;, &quot;uint&quot;, pSW, &quot;uint&quot;, 8, &quot;uint&quot;, 0x40, &quot;uint*&quot;, 0)
		; Save initial values of the first 8 bytes:
		bkpSFW := NumGet(pSFW+0, 0, &quot;int64&quot;)
		bkpSW := NumGet(pSW+0, 0, &quot;int64&quot;)
	}
	
	; Overwrite SetForegroundWindow() and ShowWindow() temporarily:
	NumPut(0x0004C200000001B8, pSFW+0, 0, &quot;int64&quot;)  ; return TRUE
	NumPut(0x0008C200000001B8, pSW+0, 0, &quot;int64&quot;)   ; return TRUE
	
	; Dump ListLines into hidden AutoHotkey main window:
	ListLines
	
	; Restore SetForegroundWindow() and ShowWindow():
	NumPut(bkpSFW, pSFW+0, 0, &quot;int64&quot;)
	NumPut(bkpSW, pSW+0, 0, &quot;int64&quot;)
	
	; Retrieve ListLines text and strip out some unnecessary stuff:
	ControlGetText, ListLinesText,, ahk_id %hwndEdit%
	RegExMatch(ListLinesText, &quot;.*`r`n`r`n\K[\s\S]*(?=`r`n`r`n.*$)&quot;, ListLinesText)
	StringReplace, ListLinesText, ListLinesText, `r`n, `n, All
	ListLinesOutput(ListLinesText)
	; ListLines On
	; return ListLinesText  ; This line appears in ListLines if we&#039;re called more than once.
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Wed, 09 Sep 2020 07:20:49 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142055#p142055</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142053#p142053</link>
			<description><![CDATA[<p>Проще всего запустить второй скрипт, который будет за Вас нажимать F5.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Wed, 09 Sep 2020 04:00:03 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142053#p142053</guid>
		</item>
		<item>
			<title><![CDATA[AHK: ListLines в реальном времени]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=142051#p142051</link>
			<description><![CDATA[<p>Добрый день. Подскажите, есть ли возможность в консоли или где нибудь еще, отображать выполнение скрипта в реальном времени ? Например если добавить команду ListLines, то там будет отображаться выполненные команды на момент открытия, а для дальнейшего отображения надо всегда нажимать &quot;обновить&quot; F5. <br />Или может есть другие способы посмотреть на выполнение скрипта ? Если я правильно разобрался, то дебагинг в notepad, ahk studio и SciTE4AutoHotkey не подходит, т.к. он делает команду за командой в ручном режиме (надо нажимать все время &quot;след. шаг&quot;).</p>]]></description>
			<author><![CDATA[null@example.com (Botsy)]]></author>
			<pubDate>Wed, 09 Sep 2020 00:50:09 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=142051#p142051</guid>
		</item>
	</channel>
</rss>
