<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: [решено]Отправка cmdline  из другой программы]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13721&amp;type=atom" />
	<updated>2018-05-22T19:46:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13721</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125551#p125551" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Хорошо. Часть набрано из смарта, поэтому - прошу прощения).</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-22T19:46:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125551#p125551</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125545#p125545" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Androgen Belkin пишет:</cite><blockquote><p>Примечание 1: в переменной 0 (а это, как ни странно - переменная) содержится количество полученных скриптом параметров.</p></blockquote></div><br /><p><span style="color: green"><strong>seriousstas</strong> Приведите свои сообщения в порядок - предложения должны начинаться с заглавной буквы и заканчиваться точкой.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-05-22T18:00:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125545#p125545</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125543#p125543" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Где там пример подсчета аргументов (об нем вопрос..):<br /><strong>A_Args.Length()</strong>&nbsp; <br />?<br />Большинство свежих статей именно на английском , приходится ломать мозг).</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-22T17:41:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125543#p125543</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125539#p125539" />
			<content type="html"><![CDATA[<p>Читайте в русском переводе:<br /></p><div class="quotebox"><cite>Gourmet пишет:</cite><blockquote><p>Передача скрипту параметров командной строки</p></blockquote></div><div class="quotebox"><cite>Androgen Belkin пишет:</cite><blockquote><p>Как передавать скрипту параметры командной строки</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-05-22T13:53:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125539#p125539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125537#p125537" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Читаю , на сколько успеваю изучать инглиш).<br />Дай-те что-то на русском..<br /> </p><div class="quotebox"><blockquote><p>Выборка аргументов командной строки</p></blockquote></div><p>Условие If (vCountArgs &lt; 4) {<br />Что выше&nbsp; - работает - спросил, тк думаю - есть проще способ.<br />............<br /></p><div class="quotebox"><blockquote><p>if A_Args.Length() &lt; 3</p></blockquote></div><p>Поправил ..</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-22T12:51:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125537#p125537</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125535#p125535" />
			<content type="html"><![CDATA[<p>Вы невнимательно читаете справку.<br />По ссылке из 7 поста всё написано с примерами.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-22T12:31:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125535#p125535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125534#p125534" />
			<content type="html"><![CDATA[<p>Есть еще задачи покрутить колесо мышы , еcли есть 4-й аргумент.<br />Ну и переключать раскладку для отправки англ. символов..<br />Вопрос - я правильно &quot;считаю&quot; аргументы ? (нашел такой скриптик) :<br /></p><div class="codebox"><pre><code>If %0% ; Выборка аргументов командной строки
{
    args := []
    vCountArgs :=0
    Loop %0%
      {
        args[A_Index] := %A_Index%
        vCountArgs++
      }
}</code></pre></div><p>Ну и он в основном скрипте (% A_Args[4] - крутит колесо мышки):<br /></p><div class="codebox"><pre><code>
SetControlDelay ,0
If (A_Args.Length() &lt; 4) {; Исправлено
SendMessage, 0x50,, 0x4090409,, A
ControlSend, % A_Args[1], % A_Args[2], % A_Args[3]
}
else{
if(A_Is64bitOS)
var = {88D33FF9-8199-4332-B69C-6B99D67A24C9}2
else
var = {88D33FF9-8199-4332-B69C-6B99D67A24C9}1
Loop, 2
    ControlClick, %var%, , Analog VU Meter, % A_Args[4]
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-22T12:14:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125534#p125534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125505#p125505" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Я понял (до того ,как прочитал))).</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-21T12:07:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125505#p125505</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125504#p125504" />
			<content type="html"><![CDATA[<p>Не для хоткеев, а для параметров в которых содержится пробел.<br />Читайте внимательно справку.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-21T12:06:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125504#p125504</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125503#p125503" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Спасибо ! Заработало).</p><p>Для хоткеев оказалось нужны кавычки(был пробел):<br /><em>sendkey.exe &quot;MegaPanelSplitterWindowContainer1&quot; &quot;{Numpad0}&quot; &quot;ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}&quot;</em></p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-21T12:00:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125503#p125503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125502#p125502" />
			<content type="html"><![CDATA[<p>Вместо &quot;A&quot; впишите имя окна.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-21T11:19:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125502#p125502</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125501#p125501" />
			<content type="html"><![CDATA[<p><strong>YMP</strong><br />Ок.!</p><p><strong>Malcev</strong><br />Что-то не так .. <br />Вместо блокнота &quot;test&quot; возвращается в строку(ну и пробовал конечно в другие окна и коммады отправлять..):</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-21T11:13:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125501#p125501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125500#p125500" />
			<content type="html"><![CDATA[<p><strong>seriousstas</strong>, компилируете обработчик sendkey.exe:<br /></p><div class="codebox"><pre><code>ControlSend, % A_Args[1], % A_Args[2], % A_Args[3]</code></pre></div><p>После этого запустив команду<br /></p><div class="codebox"><pre><code>sendkey.exe Edit1 test A</code></pre></div><p>в активное окно блокнота отправится слово test.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-21T10:29:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125500#p125500</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125499#p125499" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>seriousstas пишет:</cite><blockquote><p>Пробую так :<br /></p><div class="codebox"><pre><code>
for n, param in A_Args
{
ControlSend, A_Args[1], A_Args[2] , A_Args[3]
}</code></pre></div><p>Ну и отправляю из TC строку с тремя значениями для проверки:<br />sendkey.exe /MegaPanelSplitterWindowContainer1 /{1} /ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}<br />Где ошибки ?)</p></blockquote></div><p>Насколько я понял, cmdline в Autoit — это аналог A_Args в АНК. Тогда цикл for вам не нужен здесь. А в командной строке аргументы пишите без /.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2018-05-21T10:27:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125499#p125499</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: [решено]Отправка cmdline  из другой программы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125498#p125498" />
			<content type="html"><![CDATA[<p>Может, никак не сделаете (или очень сложно будет).<br /><a href="https://autohotkey.com/boards/viewtopic.php?f=5&amp;t=12602&amp;hilit=exec+%3A%3D+shell.Exec+ComSpec">https://autohotkey.com/boards/viewtopic … ec+ComSpec</a>.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2018-05-21T10:12:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125498#p125498</id>
		</entry>
</feed>
