<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: PostMessage]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12911&amp;type=atom" />
	<updated>2017-08-13T21:25:11Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=12911</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118238#p118238" />
			<content type="html"><![CDATA[<p>Пример названия окна:<br />D:\test.ahk - AutoHotkey v1.1.24.00<br />Впрочем можно и свое скрытое создать, с каким угодно именем.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-08-13T21:25:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118238#p118238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118237#p118237" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong> Пасиба, уже разобрался. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2017-08-13T21:19:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118237#p118237</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118236#p118236" />
			<content type="html"><![CDATA[<p>Вы в курсе что Pid можно получить из окна? А у любого запущенного скрипта всегда есть скрытое окно, одноименное с файлом скрипта.<br />И вообще, лучше использовать ahk_id, поскольку оно относится напрямую к окну, в то время как pid - опосредованно.<br />А еще проще - &quot;, MyScript ahk_class AutoHotkey&quot;. Имя конечно надо менять.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-08-13T21:07:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118236#p118236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118235#p118235" />
			<content type="html"><![CDATA[<p>Нашел <a href="http://forum.script-coding.com/viewtopic.php?pid=104174#p104174">тут</a> небольшой пример.<br />И причина была в:<br /></p><div class="codebox"><pre><code>DetectHiddenWindows, on</code></pre></div><p>Приписываем это в начало первого скрипта и всё работает.</p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2017-08-13T20:51:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118235#p118235</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118234#p118234" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Может тогда проще сразу текст вписать?</p></blockquote></div><p>Так, тсссс!! Мы ждем ответа от профессионалов.</p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2017-08-13T20:40:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118234#p118234</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118233#p118233" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>MandarinKa02 пишет:</cite><blockquote><p>Хочу передать информацию в виде текста или числа из одного окна в другое.</p></blockquote></div><div class="quotebox"><cite>MandarinKa02 пишет:</cite><blockquote><p>сначало запускаем второй скрипт и MsgBox выводи PID, после вписываем его в первый скрипт, запускаем</p></blockquote></div><p><img src="//forum.script-coding.com/img/smilies/yikes.png" width="15" height="15" /><br />Может тогда проще сразу текст вписать?</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-08-13T20:33:08Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118233#p118233</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118229#p118229" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Уверены что pid именно такой? При каждом новом запуске будете менять код?</p></blockquote></div><p>Да, каждый раз меняю. Я ж написал: сначало запускаем второй скрипт и MsgBox выводи PID, после вписываем его в первый скрипт, запускаем.</p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2017-08-13T20:13:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118229#p118229</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118228#p118228" />
			<content type="html"><![CDATA[<p>Я про содержимое, а не оформление.<br />Уверены что pid именно такой? При каждом новом запуске будете менять код?<br />Что-то не то делаете, посмотрите примеры, откуда вы там берете это.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-08-13T20:08:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118228#p118228</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118227#p118227" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong> я знаю что странно.)<br />Там есть % перед строкой, то есть:<br />% &quot;<span style="color: blue">ahk_pid</span>&quot; &quot;<span style="color: blue">4364</span>&quot; <br />равняется:<br /><span style="color: blue">ahk_pid4364</span></p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2017-08-13T20:07:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118227#p118227</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118226#p118226" />
			<content type="html"><![CDATA[<p>Не пользовался и не запускал, но эта запись выглядит как-то странно:<br /></p><div class="quotebox"><blockquote><p>&quot;ahk_pid&quot; &quot;4364&quot;</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-08-13T20:04:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118226#p118226</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: PostMessage]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118225#p118225" />
			<content type="html"><![CDATA[<p>Хочу передать информацию в виде текста или числа из одного окна в другое.<br />Использую следующие скрипты:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Cкрипты</div><div class="fancy_spoiler"><p>Сначало запускаем второй скрипт и вписываем ahk_pid в первый и после запускаем первый<br />Скрипт 1:<br /></p><div class="codebox"><pre><code>
PID := DllCall(&quot;GetCurrentProcessId&quot;)
PostMessage, DllCall(&quot;RegisterWindowMessage&quot;, Str, &quot;WM_INFO&quot;), 1,PID,, % &quot;ahk_pid&quot; &quot;4364&quot;
Msgbox % ErrorLevel

Msgbox % &quot;End&quot;
Reload
</code></pre></div><p>Скрипт 2:<br /></p><div class="codebox"><pre><code>
OnMessage(DllCall(&quot;RegisterWindowMessage&quot;, Str, &quot;WM_INFO&quot;), &quot;WM_INFO_RECEIVER&quot;)  ; регистрируем сообщение
msgbox % DllCall(&quot;GetCurrentProcessId&quot;)
Return

WM_INFO_RECEIVER(wp, lp)
{
   msgbox % wp &quot;`n&quot; lp
   return 1
}
</code></pre></div></div></div><p>Проблема в том, что первый скрипт всегда возвращает в ErrorLevel - 1 (ошибка).<br />Может что-то не так делаю? Помогите пожалуйста, заранее спасибо.</p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2017-08-13T19:56:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118225#p118225</id>
		</entry>
</feed>
