widow Posted April 14, 2005 Share Posted April 14, 2005 hello, i made a script to simply spam the F1 key as fast as possible,,this is for a game that i play.i also use the use "pause" key to pause it.. doh, lol recently the pause key does not stop the script and it just keeps spamming.. plz help maybe someone can help me write a better script?? i just want it to click F1 key as fast as possible and the ability to pause script ; <AUT2EXE VERSION: 3.0.102.0> ; ---------------------------------------------------------------------------- ; <AUT2EXE INCLUDE-START: C:\Documents and Settings\Owner\Desktop\PickupBot.au3> ; ---------------------------------------------------------------------------- Global $PAUSED HotKeySet("{pause}", "pause") HotKeySet("{ESC}", "Terminate") Func Pause() $Paused = NOT $Paused While $Paused sleep(1) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc MsgBox(0, "Pickup bot by widow", "Press ok to activate,Press Pause to Pause and press ESC to exit.") ;This is the thingy that presses F1 consecutively $Loop = 1 While $Loop = 1 Send("{F1}") WEnd Link to comment Share on other sites More sharing options...
buzz44 Posted April 14, 2005 Share Posted April 14, 2005 (edited) HotKeySet("{pause}", "pause") HotKeySet("{ESC}", "Terminate") MsgBox(0, "Pickup bot by widow", "Press ok to activate,Press the Pause key to Pause and press ESC to exit.") While 1 Send("{F1}") WEnd Func Pause() $Paused = NOT $Paused While $Paused sleep(1) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit EndFunc Edited April 14, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Developers Jos Posted April 14, 2005 Developers Share Posted April 14, 2005 Burrup, don't think that your version will ever return from the Pause() function after pause is hit once... The original script, that was decompiled?, look fine to me... You could make it hit the key faster maybe by adding Opt("SendKeyDelay",1) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
buzz44 Posted April 14, 2005 Share Posted April 14, 2005 (edited) Yes I know, I just realised that and am fixing it as we speak =). Edit: It seems i confused myself lol, so i jsut went with widows method of pause . Edited April 14, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
widow Posted April 14, 2005 Author Share Posted April 14, 2005 Yes I know, I just realised that and am fixing it as we speak =).Edit: It seems i confused myself lol, so i jsut went with widows method of pause .<{POST_SNAPBACK}>not sure why but your edited script causes error and closes when i click pause Link to comment Share on other sites More sharing options...
buzz44 Posted April 14, 2005 Share Posted April 14, 2005 Try it again now, you might of had the old version before I edited it again. qq Link to comment Share on other sites More sharing options...
widow Posted April 14, 2005 Author Share Posted April 14, 2005 Try it again now, you might of had the old version before I edited it again.<{POST_SNAPBACK}>i tried the updated version.. causes error :SERROR says:Line 23 $Paused = NOT $Paused$Paused = NOT ^ERRORError: Variable used without being declared Link to comment Share on other sites More sharing options...
widow Posted April 14, 2005 Author Share Posted April 14, 2005 its ok i got my old script to pause again =)but how can i get it to click F1 key faster??? i tried the idea above but didnt effect it at all i ran 2 of these scripts to see if it gos faster and it does so i know it can be done.. but when trying to pause both it doesnt work any ideas fellas?? Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 15, 2005 Share Posted April 15, 2005 do an adlib, look at this script that i made to have 1 hit kills in the game "The Skull Kid" on flashplayerThere isn't a reason that the function is called moo... remember that so you don't get confused...Opt ( "SendKeyDelay", 0 ) HotKeySet ( "{Space}", "Moo" ) HotKeySet ( "{Pause}", "Pause" ) HotKeySet ( "{End}", "Quit" ) While 1 Sleep ( 100 ) WEnd Func Moo() HotKeySet ( "{Space}" ) AdlibEnable ( "SendSpace", 1 ) Send ( "{Space}{Space}{Space}{Space}{Space}" ) Sleep ( 10 ) AdlibDisable ( ) HotKeySet ( "{Space}", "Moo" ) EndFunc Func SendSpace() Send ( "{Space}{Space}{Space}{Space}{Space}" ) EndFunc Func Pause() HotKeySet("{Pause}", "Unpause") HotKeySet("{Space}" ) EndFunc Func Unpause() HotKeySet("{Pause}", "Pause") HotKeySet("{Space}", "Moo" ) EndFunc Func Quit() Exit EndFunc [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
widow Posted April 15, 2005 Author Share Posted April 15, 2005 do an adlib, look at this script that i made to have 1 hit kills in the game "The Skull Kid" on flashplayerThere isn't a reason that the function is called moo... remember that so you don't get confused...Opt ( "SendKeyDelay", 0 ) HotKeySet ( "{Space}", "Moo" ) HotKeySet ( "{Pause}", "Pause" ) HotKeySet ( "{End}", "Quit" ) While 1 Sleep ( 100 ) WEnd Func Moo() HotKeySet ( "{Space}" ) AdlibEnable ( "SendSpace", 1 ) Send ( "{Space}{Space}{Space}{Space}{Space}" ) Sleep ( 10 ) AdlibDisable ( ) HotKeySet ( "{Space}", "Moo" ) EndFunc Func SendSpace() Send ( "{Space}{Space}{Space}{Space}{Space}" ) EndFunc Func Pause() HotKeySet("{Pause}", "Unpause") HotKeySet("{Space}" ) EndFunc Func Unpause() HotKeySet("{Pause}", "Pause") HotKeySet("{Space}", "Moo" ) EndFunc Func Quit() Exit EndFunc<{POST_SNAPBACK}>can someone edit that to spam the F1 key???? lol i tried but im an idiot Link to comment Share on other sites More sharing options...
widow Posted April 16, 2005 Author Share Posted April 16, 2005 can someone edit that to spam the F1 key???? lol i tried but im an idiot <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
megahyperion Posted April 17, 2005 Share Posted April 17, 2005 (edited) Did you try to decrease the time the key is held down? Do a search in the help file for "AutoItSetOption" SendKeyDelay Alters the the length of the brief pause in between sent keystrokes. Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead. SendKeyDownDelay Alters the length of time a key is held down before released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default. Time in milliseconds to pause (default=1). Edited April 17, 2005 by megahyperion Link to comment Share on other sites More sharing options...
megahyperion Posted April 17, 2005 Share Posted April 17, 2005 Oh yeah Duh heres an example AutoItSetOption("SendKeyDelay", 1); AutoItSetOption("SendKeydownDelay", 1); 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