<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Определение введенного символа => многократное воспроизведение]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5756&amp;type=atom" />
	<updated>2011-05-02T07:16:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5756</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=48010#p48010" />
			<content type="html"><![CDATA[<p>Спасибо</p>]]></content>
			<author>
				<name><![CDATA[Vault]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26926</uri>
			</author>
			<updated>2011-05-02T07:16:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=48010#p48010</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47996#p47996" />
			<content type="html"><![CDATA[<p>Так как-нибудь:<br /></p><div class="codebox"><pre><code>   Gui, Add, Hotkey, vChosenHotkey
   Gui, Add, Button, wp hp, OK
   Gui, Show
   Return

ButtonOK:
   GuiControlGet, ChosenHotkey,, ChosenHotkey
   Gui, Destroy
   Hotkey, $%ChosenHotkey%, HotkeyWork, On
   Return

HotkeyWork:
   While GetKeyState(ChosenHotkey, &quot;P&quot;)
   {
      i = 0
      if i
      {
         send {%ChoosenKeys%}
         sleep, 20
         click
         click
         sleep, 10
         i = 0
      }
      Else
      {
         send {%ChoosenKeys%}
         sleep, 20
         click
         click
         sleep, 10
         i = 1
      }
   }
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-05-01T20:59:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47996#p47996</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47971#p47971" />
			<content type="html"><![CDATA[<p>Да, именно так</p>]]></content>
			<author>
				<name><![CDATA[Vault]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26926</uri>
			</author>
			<updated>2011-04-30T23:06:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47971#p47971</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47969#p47969" />
			<content type="html"><![CDATA[<p>Ты пишешь: </p><div class="codebox"><pre><code>if not GetKeyState(&quot;%ChoosenKeys%&quot;,&quot;P&quot;)
break</code></pre></div><p>Правильно ли я понял, что ты хочешь, чтобы цикл работал только при нажатой выбранной клавише, а при её отпускании прекращался?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-04-30T22:00:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47969#p47969</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47963#p47963" />
			<content type="html"><![CDATA[<p>Спасибо большое, но всё таки я переоценил свои возможности<br />Подскажите пожалуйста, как это -<br /></p><div class="codebox"><pre><code>   Gui, Add, Hotkey, vChoosenKeys
   Gui, Add, Button, wp hp, OK
   Gui, Show
   Return

ButtonOK:
   Gui, Submit
   Return</code></pre></div><p>совместить с нужным мне результатом программы<br /></p><div class="codebox"><pre><code>i:=0
loop {
if not GetKeyState(&quot;%ChoosenKeys%&quot;,&quot;P&quot;)
break
if i
{
send {%ChoosenKeys%}
sleep, 20
click
click
sleep, 10
i:=0
}
else
{
send {%ChoosenKeys%}
sleep, 20
click
click
sleep, 10
i:=1
}
}
return</code></pre></div><p>Сам проморочился весь&nbsp; день, ничего не получается<br />Заранее благодарен</p>]]></content>
			<author>
				<name><![CDATA[Vault]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26926</uri>
			</author>
			<updated>2011-04-30T14:55:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47963#p47963</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47939#p47939" />
			<content type="html"><![CDATA[<p>Чтобы извлечь клавишу, введённую в контрол Hotkey, можно воспользоваться командой <em>Gui, Submit</em>. При её использовании введённая клавиша (или клавиши) сохраняются в ассоциированную с контролом переменную, а окно скрывается (если скрывать не нужно, тогда пишется <em>Gui, Submit, NoHide</em>). Или можно применить команду <strong><a href="http://www.autohotkey.com/docs/commands/GuiControlGet.htm">GuiControlGet</a></strong>.<br />Например:<br /></p><div class="codebox"><pre><code>   Gui, Add, Hotkey, vChoosenKeys
   Gui, Add, Button, wp hp, OK
   Gui, Show
   Return

ButtonOK:
   Gui, Submit
   MsgBox, %ChoosenKeys%
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-04-29T12:29:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47939#p47939</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47937#p47937" />
			<content type="html"><![CDATA[<p>Программу в&nbsp; трей. <br />В принципе, в реализации программы неясно только каким образом определить код нажатой клавиши, запомнить её, что бы в дальнейшем использовать её в команде send</p>]]></content>
			<author>
				<name><![CDATA[Vault]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26926</uri>
			</author>
			<updated>2011-04-29T12:07:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47937#p47937</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47919#p47919" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Vault пишет:</cite><blockquote><p>Скрипт сворачиваем.</p></blockquote></div><p>Что ты под этим понимаешь?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-04-28T20:40:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47919#p47919</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Определение введенного символа => многократное воспроизведение]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=47882#p47882" />
			<content type="html"><![CDATA[<p>Доброго времени суток.<br />Собственно нужна помощь с написанием программки.<br />Суть программы :&nbsp; вводим любой символ в поле Gui,&nbsp; Hotkey , например букву Q.<br />Скрипт сворачиваем. После этого , при первом нажатии Q выводится, допустим, <br /></p><div class="codebox"><pre><code>loop
{
send {Q}
sleep, 200
click
sleep, 200
}</code></pre></div><p>повторное нажатие Q - останавливает скрипт</p><p>Проблема заключается в том, что я не знаю, как переменную из поля Hotkey преобразовать в кнопку, которую можно использовать в команде send</p>]]></content>
			<author>
				<name><![CDATA[Vault]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26926</uri>
			</author>
			<updated>2011-04-28T00:41:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=47882#p47882</id>
		</entry>
</feed>
