<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Off и On скрипта по кнопке]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9323&amp;type=atom" />
	<updated>2014-03-05T21:52:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9323</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Off и On скрипта по кнопке]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80536#p80536" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>pause::pause</code></pre></div><p>На кнопку pause, соответственно</p>]]></content>
			<author>
				<name><![CDATA[Zmey25]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27845</uri>
			</author>
			<updated>2014-03-05T21:52:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80536#p80536</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Off и On скрипта по кнопке]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80528#p80528" />
			<content type="html"><![CDATA[<p><span style="color: #008800"><strong>ДаНет</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте пост.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-03-05T11:36:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80528#p80528</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Off и On скрипта по кнопке]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80526#p80526" />
			<content type="html"><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p>#NoEnv<br />SendMode Input</p><p>_auto := true ;Toggle for the anti-recoil being on or off. default is on</p><p>~LButton::autofire() ; When the LButton is pressed run the autofire() function<br />+LButton::_auto := ! _auto ;Shift + LButton used to toggle the anti-recoil on and off<br />F1::ExitApp ; F1 used to exit the ahk script file</p><p>; autofire() function, name is misleading could easily be antiRecoil()<br />autofire()<br />{<br />&nbsp; global _auto <br />&nbsp; if _auto ; if _auto == true. i.e. is anti-recoil on? <br />&nbsp; { ; anti-recoil on?&nbsp; If yes do this<br />&nbsp; &nbsp; Loop ; Continuously loop until a &#039;break&#039; command<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; if GetKeyState(&quot;LButton&quot;, &quot;P&quot;) ; If LButton is pressed<br />&nbsp; &nbsp; &nbsp; { ; LButton pressed? If yes do this<br />&nbsp; &nbsp; &nbsp; &nbsp; Sleep 85 ; sleep for 85 milliseconds<br />&nbsp; &nbsp; &nbsp; &nbsp; mouseXY(0, 6) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,)<br />&nbsp; &nbsp; &nbsp; &nbsp; Sleep 45 ; sleep for 45milliseconds<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; else ;LButton pressed? If no do this, i.e. exit the loop<br />&nbsp; &nbsp; &nbsp; &nbsp; break ;will stop the loop<br />&nbsp; &nbsp; } ;; loop<br />&nbsp; } ;; if<br />} ;; autofire() ; anti-recoil on? If no do nothing</p><p>mouseXY(x,y)<br />{<br />&nbsp; DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0) ; moves the mouse could easily be the built in autohotkey MouseMove, X, Y<br />}</p></div></div><br /><br /><p>Подскажите. Вот на F1 скрипт выключается полностью и закрывается. Как сделать, чтобы на F1 он просто отключался и на F2 включался? То есть : F1- Off, F2-On. Спасибо заранее!</p>]]></content>
			<author>
				<name><![CDATA[ДаНет]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31470</uri>
			</author>
			<updated>2014-03-05T07:38:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80526#p80526</id>
		</entry>
</feed>
