<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Вывод StdOut в переменную скрипта]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14653&amp;type=atom" />
	<updated>2019-03-20T17:42:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14653</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133024#p133024" />
			<content type="html"><![CDATA[<p>Попробовал, но всё равно не выполняется горячая клавиша</p>]]></content>
			<author>
				<name><![CDATA[sergeich]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=819</uri>
			</author>
			<updated>2019-03-20T17:42:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133024#p133024</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133023#p133023" />
			<content type="html"><![CDATA[<p>Попробуйте перед циклом вставить:<br /></p><div class="codebox"><pre><code>		Critical, off
		Thread, Priority,-100</code></pre></div>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2019-03-20T17:31:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133023#p133023</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133022#p133022" />
			<content type="html"><![CDATA[<p>Хорошо, попробую поискать про многопоточность, спасибо!</p>]]></content>
			<author>
				<name><![CDATA[sergeich]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=819</uri>
			</author>
			<updated>2019-03-20T17:29:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133022#p133022</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133021#p133021" />
			<content type="html"><![CDATA[<p>Решение будет зависеть от того, что конкретно нужно делать во время работы функции. В общем случае придётся разбивать на два потока тем или иным способом. Ищите по форуму про многопоточность.<br />Чтобы запостить код, есть тег [cоde].</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-03-20T17:27:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133021#p133021</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133020#p133020" />
			<content type="html"><![CDATA[<p>Сделал горячую клавишу на выход:</p><div class="codebox"><pre><code>
#x::
Process, Close, mosquitto_pub.exe
Process, Close, mosquitto_sub.exe
ExitApp
</code></pre></div><p>При нажатии, ничего не происходит, после первого же вывода в StdOut, горячая клавиша срабатывает и приложение закрывается. Контекстное меню тоже не открывается.. В общем так же как в первом варианте, только окно консольного приложения запускается скрытым, что хорошо)</p>]]></content>
			<author>
				<name><![CDATA[sergeich]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=819</uri>
			</author>
			<updated>2019-03-20T17:19:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133020#p133020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133019#p133019" />
			<content type="html"><![CDATA[<p>В смысле, не можете завершить скрипт из меню иконки в трее?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-03-20T17:12:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133019#p133019</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133012#p133012" />
			<content type="html"><![CDATA[<p>Используйте второй вариант, он вроде не морозит скрипт.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-03-20T16:36:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133012#p133012</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133010#p133010" />
			<content type="html"><![CDATA[<p>Обнаружил, при выполнении:</p><div class="codebox"><pre><code>
....
exec := shell.Exec(CMD)
while !exec.StdOut.AtEndOfStream {
   str := exec.StdOut.ReadLine()
....
}
</code></pre></div><p>невозможно выполнять другие действия в скрипте, например, назначенная горячая клавиша на выход не работает до тех пор, пока не закроется запущенная программа, из которой идет выход StdOut. Даже контекстное меню при клике по иконке в трее не открывается. Возможно как то выйти из этого положения?</p>]]></content>
			<author>
				<name><![CDATA[sergeich]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=819</uri>
			</author>
			<updated>2019-03-20T16:28:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133010#p133010</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132999#p132999" />
			<content type="html"><![CDATA[<p><strong>YMP</strong>, да, и алгоритм другой.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-03-20T10:04:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132999#p132999</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132995#p132995" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>sergeich пишет:</cite><blockquote><p>Вместо Sleep, 1000 сделал:</p><p>WinWait, ahk_class ConsoleWindowClass<br />WinHide, ahk_class ConsoleWindowClass</p></blockquote></div><p>Вероятно, во избежание ложных срабатываний лучше как-то так<br /></p><div class="codebox"><pre><code>WinWait % &quot;ahk_pid &quot; exec.ProcessID
WinHide
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[wisgest]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=3850</uri>
			</author>
			<updated>2019-03-20T08:13:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132995#p132995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132986#p132986" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Возможно и этот был взят за первооснову, а может и нет, уже не помню.</p></blockquote></div><p>Судя по названию (CmdRet) первооснова была с англофорума. Там я видел функцию с таким названием.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2019-03-20T05:34:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132986#p132986</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132981#p132981" />
			<content type="html"><![CDATA[<p>У меня убрана обработка ситуации, когда в запущенное консольное приложение можно отправлять несколько команд одну за другой, как в этом примере:<br /></p><div class="codebox"><pre><code>CmdLine = nslookup
Input =                ; Ввод нескольких команд.
(
mail.ru
yandex.ru
google.com
)

Ret := RunCon(CmdLine, Input, Output)
MsgBox, %Output%
MsgBox, Код выхода: %Ret%</code></pre></div><p>Такой вариант редко нужен.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-03-19T20:34:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132981#p132981</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132979#p132979" />
			<content type="html"><![CDATA[<p>Если вспомнишь отличия, то хорошо бы добавить в ту же тему.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-03-19T19:27:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132979#p132979</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132978#p132978" />
			<content type="html"><![CDATA[<p>Возможно и этот был взят за первооснову, а может и нет, уже не помню. Помню, что что-то подправлял и что-то выкидывал.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-03-19T19:20:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132978#p132978</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод StdOut в переменную скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132977#p132977" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Нормально, это твой вариант <a href="http://forum.script-coding.com/viewtopic.php?pid=76680#p76680">этого</a>, или есть отличия?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-03-19T19:13:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132977#p132977</id>
		</entry>
</feed>
