<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=8682&amp;type=atom" />
	<updated>2013-09-23T20:29:25Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=8682</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Назначить кнопку активации скрипта.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=75516#p75516" />
			<content type="html"><![CDATA[<p>Надеюсь этот пример вам поможет.<br /></p><div class="codebox"><pre><code>pause
loop, {
    Msgbox Проверка работоспособности.
    sleep, 5000
    }
f2::pause</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Zmey25]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27845</uri>
			</author>
			<updated>2013-09-23T20:29:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=75516#p75516</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Назначить кнопку активации скрипта.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=75478#p75478" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>nikolay281644 пишет:</cite><blockquote><p><a href="http://forum.script-coding.com/viewtopic.php?pid=69475#p69475">Извиняюсь, что возможно не допонял правила форума......Пытаюсь найти , что не так оформил....</a></p></blockquote></div><p>И название темы должно начинатся с большой буквы, и <span class="bbu">отражать её суть</span>.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-20T09:32:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=75478#p75478</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Назначить кнопку активации скрипта.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=75476#p75476" />
			<content type="html"><![CDATA[<p>Есть скрипт :<br />#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><br /><br /><br /><p>ПОдскажите, на какую кнопку его запускать( он запускается сразу, как запустишь) и как его выключать.<br />Также подскажите, я бы хотел сделать так, чтобы на F2 он запускался, и на F2 останавливался, или на CAPSLOCK. В общем как изменить в скрипте, чтобы назначить кнопку OFF и ON</p><p>Заранее спасибо.</p>]]></content>
			<author>
				<name><![CDATA[nikolay281644]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=29604</uri>
			</author>
			<updated>2013-09-20T06:12:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=75476#p75476</id>
		</entry>
</feed>
