gamepin126 Posted May 25, 2006 Share Posted May 25, 2006 (edited) How would I get mouse left click and scroll up/down as a HotKeySet? This is what I'm trying to do. $i = 0 $toggle = 0 HotKeySet("mouse left click", "Counter") HotKeySet("up", "Toggle") HotKeySet("Scroll Up" OR "Scroll Down", "RapidFire") Func Counter() If $i < 12 AND $toggle = 1 Then $i = $i + 1 Else $i = 0 EndIF EndFunc Func Toggle () If $toggle = 0 Then $toggle =1 Else $toggle = 0 EndIf EndFunc Func RapidFire() MouseClick("Left") Send("R") EndFunc Edited May 25, 2006 by gamepin126 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted May 25, 2006 Share Posted May 25, 2006 (edited) check out _IsPressed in beta #include <Misc.au3> $i = 0 $toggle = 0 WHile 1 If _IsPressed("01") Then Counter(); MOUSE CLICK LEFT If _IsPressed("26") Then Toggle(); UP ARROW If _IsPressed("04") Then RapidFire(); SCROLL ON MOUSE, YOU MUST CLICK YOU CANT JUST SCROLL WEnd Func Counter() If $i < 12 & $toggle = 1 Then $i = $i + 1 Else $i = 0 EndIF EndFunc Func Toggle () If $toggle = 0 Then $toggle =1 Else $toggle = 0 EndIf EndFunc Func RapidFire() MouseClick("Left") Send("R") EndFunc Edited May 26, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
gamepin126 Posted May 25, 2006 Author Share Posted May 25, 2006 (edited) Thanks so much Edit: How do I get scroll up/down to work then? Edited May 25, 2006 by gamepin126 Link to comment Share on other sites More sharing options...
gamepin126 Posted May 25, 2006 Author Share Posted May 25, 2006 (edited) Someone mind testing this for me? The computer I wrote this on cannot run the script smoothly and play a game at the same time. expandcollapse popup#include <Misc.au3> $i = 0 $ReloadToggle = 0 $AutoToggle = 0 HotKeySet ("DOWN", "AutoToggle") ;DOWN ARROW HotKeySet ("UP", "ReloadToggle"); UP ARROW WinWaitActive ("aderans.swf (application/x-shockwave-flash Object) - Mozilla Firefox") WHile 1 If _IsPressed("01") Then Counter(); MOUSE CLICK LEFTs If _IsPressed("04") Then RapidFire(); SCROLL ON MOUSE, YOU MUST CLICK YOU CANT JUST SCROLL WEnd If $AutoToggle = 1 Then Do Auto() Until $AutoToggle = 0 EndIf Func RapidFire() MouseClick("Left") Send("{R}") Sleep(10) EndFunc Func Auto() MouseClick("Left") Send("{R}") Sleep(10 EndFunc Func Counter() If $i < 10 AND $ReloadToggle = 1 Then $i = $i + 1 EndIf EndFunc Func ReloadToggle () If $ReloadToggle = 0 Then $ReloadToggle =1 Else $ReloadToggle = 0 EndIf EndFunc Func AutoToggle () If $AutoToggle = 0 Then $AutoToggle =1 Else $AutoToggle = 0 EndIf EndFunc Edited May 25, 2006 by gamepin126 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted May 26, 2006 Share Posted May 26, 2006 Ok with your Hotkeysets if your going to do a Key and not just a letter then you must put it in brackets {} for example Enter would {Enter} and theres no point in mixing hotkeys and _Ispresseds and the If $AutoToggle = 1 Then Do Auto() Until $AutoToggle = 0 EndIf oÝ÷ ÚØZ¶w¯z¸¶ÇWmçºÇ¢¶Ë-Yç$x¢»ax)ë,yÛ,£*.«Þ¶a®-«bØ^)²kÊØb±«¢+Ø(¥¹±Õ±Ðí5¥Í¹ÔÌÐì(ÀÌØí¤ôÀ(ÀÌØíI±½Q½±ôÀ(ÀÌØíÕѽQ½±ôÀ()]¥¹]¥ÑÑ¥Ù ÅÕ½Ðíɹ̹ÍÝ¡ÁÁ±¥Ñ¥½¸½àµÍ¡½ÝÙµ±Í =©Ð¤´5½é¥±±¥É½àÅÕ½Ðì¤)]!¥±Ä(%}%ÍAÉÍÍ ÅÕ½ÐìÀÄÅÕ½Ðì¤Q¡¸ ½Õ¹ÑÈ ¤ì5=UM 1% ,1QÌ(%}%ÍAÉÍÍ ÅÕ½ÐìÀÐÅÕ½Ðì¤Q¡¸IÁ¥¥É ¤ìM I=10=85=UM°e=T5UMP 1% ,e=T 9P)UMPM I=10(%%}%ÍAÉÍÍ ÅÕ½ÐìÈØÅÕ½Ðì¤Q¡¸I±½Q½± ¤ìU@ä(%%}%ÍAÉÍÍ ÅÕ½ÐìÈàÅÕ½Ðì¤Q¡¸ÕѽQ½± ¤ì½Ý¸-ä(%%}%ÍAÉÍÍ ÅÕ½ÐìÅÅÕ½Ðì¤Q¡¸EեР¤ìììÍÁ-ä(%%ÀÌØíÕѽQ½±ôÄQ¡¸(¼(ÕѼ ¤(U¹Ñ¥°ÀÌØíÕѽQ½±ôÀ)¹%)]¹()Õ¹IÁ¥¥É ¤(5½ÕÍ ±¥¬ ÅÕ½Ðí1ÐÅÕ½Ðì¤(M¹ ÅÕ½ÐíHÅÕ½Ðì¤ì콹йíô¥ÑÌ©ÕÍбÑÑÈ(M±À ÄÀ¤)¹Õ¹()Õ¹ÕѼ ¤(5½ÕÍ ±¥¬ ÅÕ½Ðí1ÐÅÕ½Ðì¤(M¹ ÅÕ½ÐíHÅÕ½Ðì¤ì콹йíô¥ÑÌ©ÕÍбÑÑÈ(M±À ÄÀ¤)¹Õ¹()Õ¹ ½Õ¹ÑÈ ¤(%ÀÌØí¤±ÐìÄÀ9ÀÌØíI±½Q½±ôÄQ¡¸(ÀÌØí¤ôÀÌØí¤¬Ä(¹%)¹Õ¹()Õ¹I±½Q½± ¤(%ÀÌØíI±½Q½±ôÀQ¡¸(ÀÌØíI±½Q½±ôÄ(±Í(ÀÌØíI±½Q½±ôÀ(¹%)¹Õ¹()Õ¹ÕѽQ½± ¤(%ÀÌØíÕѽQ½±ôÀQ¡¸(ÀÌØíÕѽQ½±ôÄ(±Í(ÀÌØíÕѽQ½±ôÀ(¹%)¹Õ¹)Õ¹EեР¤(%á¥Ð)¹Õ¹ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now