EjayMega Posted September 10, 2004 Share Posted September 10, 2004 (edited) expandcollapse popupWinWaitActive ( "Tibia") $Inc = 1 While 1 $SwitchOne = HotKeySet ( "{INSERT}", "SwitchOne" ) $SwitchTwo = HotKeySet ( "{CTRL}", "SwitchTwo" ) Select Case $SwitchOne = 0 SwitchPel () Case $SwitchTwo = 0 SwitchTwo () Case WinWaitClose ("Tibia") IamDone () EndSelect WEnd Func SwitchOne () MouseMove ( 952, 317, 0 ) EndFunc Func SwitchTwo () $Inc = 2 EndFunc Func SwitchPel () While 1 Select Case $Inc = 1 Sleep ( 300 ) SwitchOne () EndSelect WEnd EndFunc Func IamDone () Exit EndFunc I want this script to run a unlimited loop when i press INSERT and when I press Ctrl it should stop...But i dont know why it doesnt... happend Between this is my first script in auto it Edit: Forgot to say... SwitchTwo () Makes $INC = 2 so the SwitchPel () stops... Edited September 10, 2004 by EjayMega Link to comment Share on other sites More sharing options...
Developers Jos Posted September 10, 2004 Developers Share Posted September 10, 2004 I want this script to run a unlimited loop when i press INSERT and when I press Ctrl it should stop...But i dont know why it doesnt... happend Between this is my first script in auto it Edit: Forgot to say... SwitchTwo () Makes $INC = 2 so the SwitchPel () stops... <{POST_SNAPBACK}>Don't really understand what you want to do but here are a couple of pointers: - HotKeySet() doesn't return a value but will perform the Function when the key is hit. - {CTRL} is not a valid key. - The HoKeySet is something you do once before the loop. so something like this: HotKeySet("{INSERT}", "SwitchOne") HotKeySet("{CTRL}", "SwitchTwo") While 1 If Not WinExists("Tibia") then IamDone() sleep(50) Wend 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...
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