Gijoe Posted March 16, 2007 Posted March 16, 2007 i am tring to mnake a simple bot. let me post the code then tell me why when i hit F7 it turns off the function for F5. ; Script Start - Add your code below here HotKeySet("{F5}", "Begin") HotKeySet("{F6}", "Pause") HotKeySet("{F7}", "Auto") HotKeySet("{F8}", "Terminate") MsgBox ( 0, "Buff", "(Freezer Bot)" ) TrayTip("Buff", "F5 start, F6 stop, F7 Loot", 5,1) Func Begin () While 1 Send("2") Sleep(1000) Send("3") Sleep(1000) Send("4") Sleep(1000) Send("1") Sleep(30000) WEnd EndFunc Func Pause () While 1 Sleep(1) WEnd EndFunc Func Auto () While 1 Send("{SPACE}") Sleep(300) WEnd EndFunc Func Terminate () MsgBox(0, "Buff", "Thanks for using the bot.") Exit EndFunc While 1 Sleep(1) WEnd
PaulIA Posted March 16, 2007 Posted March 16, 2007 i am tring to mnake a simple bot.let me post the code then tell me why when i hit F7 it turns off the function for F5.; Script Start - Add your code below hereHotKeySet("{F5}", "Begin")HotKeySet("{F6}", "Pause")HotKeySet("{F7}", "Auto")HotKeySet("{F8}", "Terminate")MsgBox ( 0, "Buff", "(Freezer Bot)" )TrayTip("Buff", "F5 start, F6 stop, F7 Loot", 5,1)Func Begin ()While 1Send("2")Sleep(1000)Send("3")Sleep(1000)Send("4")Sleep(1000)Send("1")Sleep(30000)WEndEndFuncFunc Pause ()While 1Sleep(1)WEndEndFuncFunc Auto ()While 1Send("{SPACE}") Sleep(300)WEndEndFuncFunc Terminate ()MsgBox(0, "Buff", "Thanks for using the bot.")ExitEndFuncWhile 1Sleep(1)WEndWorks fine for me. I can hit F5 to start, F7 to send spaces, F6 to pause and then F5 to restart. Auto3Lib: A library of over 1200 functions for AutoIt
Gijoe Posted March 16, 2007 Author Posted March 16, 2007 when i run it i hit F5 to start2341 count it should repeat every 30secs.but when i hit F7 to start spacebar it stops the 30sec count down for the F5.i want spacbar to click every 300ms and there other to repeat every 30secs
PaulIA Posted March 16, 2007 Posted March 16, 2007 when i run it i hit F5 to start2341 count it should repeat every 30secs.but when i hit F7 to start spacebar it stops the 30sec count down for the F5.i want spacbar to click every 300ms and there other to repeat every 30secsOnly in a multithread application, which AutoIt is not. When you press one key, the program stops what it was doing and jumps to the other code. You can do what you want with a state machine, but not the way you have things coded. Do a search for "state machine" and you'll get hits on this as I've showed others how to do this. Auto3Lib: A library of over 1200 functions for AutoIt
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