robot999 Posted October 27, 2006 Share Posted October 27, 2006 hi i made a small program for a game i am playing, ive jus started to use autoit and am not very good at it i was wondering if any1 could help me with this program..basically it auto preses buttons for u in the game i was wondering how i could pause the script and restart it wen i needed it. ---this is the program so far-------- HotKeySet("b", "Buff") HotKeySet('{END}','_Exit') ;------function to buff up Func Buff() For $i = 6 To 9 Step +1 send($i) sleep(3000) Next send("0") ;-----Function to exit script Func _Exit() Exit EndFunc while 1 Sleep(100) WEnd --------------------end program -------- so im guessing im gonna need 2 more functions a pause and a restart, i would like to assign the pause script to the pause button and the restart script to the scroll lock button. so the pause function will be something like this...? HotKeySet("{PAUSE}", "Pause") Global $Paused while 1=1 Func Pause() $Paused = NOT $Paused While $Paused Sleep (400) WEnd EndFunc ; => Pause() hmm i hve no idea how to code the restart function any help will be greatly appreciated.ill have a go at it though plz correct me where i go wrong HotKeySet("{SCROLL}", "Start") Func Start() EndFunc Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 27, 2006 Moderators Share Posted October 27, 2006 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
robot999 Posted October 27, 2006 Author Share Posted October 27, 2006 =( Link to comment Share on other sites More sharing options...
Ed_Maximized Posted October 27, 2006 Share Posted October 27, 2006 hi i made a small program for a game i am playing, ive jus started to use autoit and am not very good at it i was wondering if any1 could help me with this program..basically it auto preses buttons for u in the game i was wondering how i could pause the script and restart it wen i needed it.---this is the program so far--------HotKeySet("b", "Buff") HotKeySet('{END}','_Exit');------function to buff upFunc Buff() For $i = 6 To 9 Step +1 send($i) sleep(3000) Next send("0") ;-----Function to exit scriptFunc _Exit() Exit EndFunc while 1 Sleep(100) WEnd--------------------end program --------so im guessing im gonna need 2 more functions a pause and a restart, i would like to assign the pause script to the pause button and the restart script to the scroll lock button.so the pause function will be something like this...?HotKeySet("{PAUSE}", "Pause") Global $Paused while 1=1 Func Pause() $Paused = NOT $Paused While $Paused Sleep (400) WEnd EndFunc ; => Pause()hmm i hve no idea how to code the restart function any help will be greatly appreciated.ill have a go at it though plz correct me where i go wrongHotKeySet("{SCROLL}", "Start") Func Start() EndFuncsuggestions: 1) use appropiate tags to make your code more readable (Autoit tags)2) search the forum for similar scripts3) agree with SmOke_N... post in support forum. This forum is for working scripts...Wellcome to the forums!!! ShapedGUI Creator : Shaped gui the easy way!!!Txt2au3 : the easy way to include text files into your program without fileinstall_GUICreateWithTiledBackground : Put a GIF in the background of your formsSQLite Database BrowserAnimated GIF UDF : Put animations in your GUI's 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