<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: получить переменную из потока autohotkey.dll]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13181</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13181&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: получить переменную из потока autohotkey.dll».]]></description>
		<lastBuildDate>Fri, 10 Nov 2017 17:33:26 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: получить переменную из потока autohotkey.dll]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=121015#p121015</link>
			<description><![CDATA[<p>Спасибо.<br />Код из справки почему-то выдавал какие-то цифры.</p>]]></description>
			<author><![CDATA[null@example.com (Dworkin)]]></author>
			<pubDate>Fri, 10 Nov 2017 17:33:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=121015#p121015</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: получить переменную из потока autohotkey.dll]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=121005#p121005</link>
			<description><![CDATA[<div class="quotebox"><cite>Dworkin пишет:</cite><blockquote><p>Скажите пожалуйста как вытащить переменную var из запущеного потока?</p><p>Вот справка:<br /><a href="https://hotkeyit.github.io/v2/docs/commands/ahkgetvar.htm">https://hotkeyit.github.io/v2/docs/comm … getvar.htm</a></p></blockquote></div><p>А в чём подвох? Код из справки у вас не работает?<br /></p><div class="codebox"><pre><code>
dllpath:= &quot;AutoHotkey.dll&quot;
codefromvar =
(
var := 5
MsgBox, Hello World!
)

DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,dllpath) ; Load the AutoHotkey module.
DllCall(dllpath &quot;\ahktextdll&quot;,&quot;Str&quot;,codefromvar,&quot;Str&quot;,&quot;&quot;,&quot;CDecl&quot;) ; start a new thread from file.
OutputVar := DllCall(dllpath &quot;\ahkgetvar&quot;, &quot;Str&quot;, &quot;Var&quot;, &quot;UInt&quot;, 0 ,&quot;CDecl Str&quot;)
MsgBox, %OutputVar%
While DllCall(dllpath &quot;\ahkReady&quot;)
  Sleep 100 ; wait for the thread to exit
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Fri, 10 Nov 2017 04:31:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=121005#p121005</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: получить переменную из потока autohotkey.dll]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=120997#p120997</link>
			<description><![CDATA[<p>Видел для _L <a href="https://autohotkey.com/boards/viewtopic.php?f=6&amp;t=6194">такую ф-ию</a> с доступом к переменным и функциям дочернего процесса. Не поток, но все же.</p>]]></description>
			<author><![CDATA[null@example.com (stealzy)]]></author>
			<pubDate>Thu, 09 Nov 2017 19:17:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=120997#p120997</guid>
		</item>
		<item>
			<title><![CDATA[AHK: получить переменную из потока autohotkey.dll]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=120996#p120996</link>
			<description><![CDATA[<p>Добрый вечер. Решил немного изучить многопоточность в ahk с помощью autohotkey.dll.</p><p>Сам autohotkey.dll скачал отсюда:<br /><a href="https://raw.githubusercontent.com/HotKeyIt/ahkdll-v1-release/master/Win32w/AutoHotkey.dll">https://raw.githubusercontent.com/HotKe … Hotkey.dll</a><br />Библиотеки отсюда:<br /><a href="https://github.com/HotKeyIt/ahkdll-v2-release/blob/master/Compiler/Lib/AhkExported.ahk">https://github.com/HotKeyIt/ahkdll-v2-r … ported.ahk</a><br /><a href="https://github.com/zhamlin/Macro/blob/master/lib/AhkDllThread.ahk">https://github.com/zhamlin/Macro/blob/m … Thread.ahk</a></p><p>НО их я закинул в папку lib где установлен autohotkey иначе через #include почему-то не работает.</p><p>Нормально запускает скрипт файл в другом потоке:<br /></p><div class="codebox"><pre><code>dllpath:= &quot;AutoHotkey.dll&quot;
DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,dllpath) ; Load the AutoHotkey module.
DllCall(dllpath &quot;\ahkdll&quot;,&quot;Str&quot;,A_ScriptDir &quot;\httptest.ahk&quot;,&quot;Str&quot;,&quot;&quot;,&quot;CDecl&quot;) ; start a new thread from file.
While DllCall(dllpath &quot;\ahkReady&quot;)
  Sleep 100 ; wait for the thread to exit</code></pre></div><p>Можно ли и как вытащить переменную из запущенного скрипта в другом потоке?</p><p>Нормально запускает код:<br /></p><div class="codebox"><pre><code>dllpath:= &quot;AutoHotkey.dll&quot;
codefromvar =
(
var := 5
MsgBox, Hello World!
)

DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,dllpath) ; Load the AutoHotkey module.
DllCall(dllpath &quot;\ahktextdll&quot;,&quot;Str&quot;,codefromvar,&quot;Str&quot;,&quot;&quot;,&quot;CDecl&quot;) ; start a new thread from file.
While DllCall(dllpath &quot;\ahkReady&quot;)
  Sleep 100 ; wait for the thread to exit</code></pre></div><p>Скажите пожалуйста как вытащить переменную var из запущеного потока?</p><p>Вот справка:<br /><a href="https://hotkeyit.github.io/v2/docs/commands/ahkgetvar.htm">https://hotkeyit.github.io/v2/docs/comm … getvar.htm</a></p>]]></description>
			<author><![CDATA[null@example.com (Dworkin)]]></author>
			<pubDate>Thu, 09 Nov 2017 18:55:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=120996#p120996</guid>
		</item>
	</channel>
</rss>
