<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: отключение While GetKeyState]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12806&amp;type=atom" />
	<updated>2017-07-14T21:46:38Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12806</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117274#p117274" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> Спасибо дядь!</p>]]></content>
			<author>
				<name><![CDATA[valeron_121]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37603</uri>
			</author>
			<updated>2017-07-14T21:46:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117274#p117274</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117271#p117271" />
			<content type="html"><![CDATA[<p>По-простому не вышло.<br /></p><div class="codebox"><pre><code>DllCall(&quot;SetWindowsHookEx&quot;
   , Int, WH_KEYBOARD_LL := 13
   , Ptr, RegisterCallback(&quot;LowLevelKeyboardProc&quot;, &quot;Fast&quot;)
   , Ptr, DllCall(&quot;GetModuleHandle&quot;, UInt, 0, Ptr)
   , UInt, 0, Ptr)

Ralt::
While mode != &quot;Off&quot; &amp;&amp; GetKeyState(&quot;Ralt&quot;, &quot;P&quot;)
{
   Send, Нужный мне текст
}
Return

LowLevelKeyboardProc(nCode, wParam, lParam)  {
   global mode
   static WM_KEYDOWN := 0x100, WM_KEYUP := 0x104, WM_SYSKEYUP := 0x105
   
   msg := wParam
   vk := NumGet(lParam + 0, &quot;UInt&quot;)
   
   if ( msg = WM_KEYDOWN &amp;&amp; vk = 0x5A )  {
      mode := &quot;Off&quot;
      Return 1
   }
   ( (msg = WM_SYSKEYUP || msg = WM_KEYUP) &amp;&amp; vk = 0xA5 &amp;&amp; mode := &quot;On&quot; )
   Return DllCall(&quot;CallNextHookEx&quot;, Ptr, 0, Int, nCode, Ptr, wParam, Ptr, lParam)
}</code></pre></div><p>При нажатии на Z цикл прекращается.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-14T17:23:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117271#p117271</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117270#p117270" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> Это как сделать то?</p>]]></content>
			<author>
				<name><![CDATA[valeron_121]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37603</uri>
			</author>
			<updated>2017-07-14T16:48:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117270#p117270</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117269#p117269" />
			<content type="html"><![CDATA[<p>Проще по нажатию другой клавиши прекращать действие, привязанное к Alt, чем отжимать её.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-14T16:39:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117269#p117269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117268#p117268" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> Это не вся часть скрипта просто, это я так для примера написал. Вообще его суть, когда я зажимаю альт, он выполняет нужные мне действия, но как только ему придет информация об отключении флуда, я просто банально не успею отпустить. И мне это важно очень. Надеюсь поможете.</p>]]></content>
			<author>
				<name><![CDATA[valeron_121]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37603</uri>
			</author>
			<updated>2017-07-14T16:02:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117268#p117268</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117267#p117267" />
			<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>2017-07-14T15:49:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117267#p117267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: отключение While GetKeyState]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117266#p117266" />
			<content type="html"><![CDATA[<p>Что только не перепробовал. Суть такая, когда зажал Правый альт, он начинает флудить нужный мне текст, и по нажатию<br />на другую кнопку, должен отжаться Правый альт.</p><div class="codebox"><pre><code>
Z::
; код который должен отжать RAlt (желательно что бы код был именно тут)
Return

Ralt::
While GetKeyState(&quot;Ralt&quot;, &quot;P&quot;)
{
Send, Нужный мне текст
}
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[valeron_121]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37603</uri>
			</author>
			<updated>2017-07-14T15:18:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117266#p117266</id>
		</entry>
</feed>
