<?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=5485&amp;type=atom" />
	<updated>2011-02-07T17:27:47Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5485</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK включение выключение одной кнопкой (тугл?)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=44966#p44966" />
			<content type="html"><![CDATA[<p>Так как-нибудь:<br /></p><div class="codebox"><pre><code>*MButton::
Hotkey, *LButton, LButton, % (i := !i) ? &quot;On&quot; : &quot;Off&quot;
Loop 
   { 
      Sleep 90 
      GetKeyState, szButtonState, MButton, P 
      if szButtonState = U 
         break 
      MouseClick, left,,, 1, 0, D 
      Sleep, 20 
      MouseClick, left,,, 1, 0, U 
      DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, 2, uint,0, int,0 ) 
   } 
return

LButton:
Loop 
   { 
      Sleep 90 
      GetKeyState, szButtonState, LButton, P 
      if szButtonState = U 
         break 
      MouseClick, left,,, 1, 0, D 
      Sleep, 20 
      MouseClick, left,,, 1, 0, U 
      DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, 2, uint,0, int,0 ) 
   } 
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-02-07T17:27:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=44966#p44966</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK включение выключение одной кнопкой (тугл?)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=44960#p44960" />
			<content type="html"><![CDATA[<p>Вобщем есть такой код:<br /></p><div class="codebox"><pre><code>$*MButton::
Loop 
   { 
      Sleep 90 
      GetKeyState, szButtonState, MButton, P 
      if szButtonState = U 
         break 
      MouseClick, left,,, 1, 0, D 
      Sleep, 20 
      MouseClick, left,,, 1, 0, U 
      DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, 2, uint,0, int,0 ) 
   } 
return</code></pre></div><p>Подскажите пожалуйста, как сделать так, чтобы MButton включала\выключала нижний код (левая кнопка выполняет свою функцию, но при нажатии MButton, левая кнопка выполняла скрипт, при повторном нажатии MButton левая кнопка опять начала выполнять свою функцию ).<br /></p><div class="codebox"><pre><code>$*LButton::
Loop 
   { 
      Sleep 90 
      GetKeyState, szButtonState, LButton, P 
      if szButtonState = U 
         break 
      MouseClick, left,,, 1, 0, D 
      Sleep, 20 
      MouseClick, left,,, 1, 0, U 
      DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, 2, uint,0, int,0 ) 
   } 
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vinternete]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25439</uri>
			</author>
			<updated>2011-02-07T17:10:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=44960#p44960</id>
		</entry>
</feed>
