0pie Posted July 1, 2013 Share Posted July 1, 2013 (edited) Hey all, I'm trying to make a script that loops betweeh hitting "R" and "ENTER" when I hit F6, stops when I hit F7, and restarts when I hit F6 again. (I'm putting a bunch of stuff into a chest in Skyrim, haha). Here's my code: Local $var Func Simple1() $var=1 EndFunc Func Simple2() $var=2 EndFunc HotKeySet ("{F6}", "Simple1") HotKeySet ("{F7}", "Simple2") Select Case $var = 1 Send ("{ENTER}") Send ("{R}") Sleep (1000) HotKeySet ("{F6}", "Simple1") HotKeySet ("{F7}", "Simple2") Case $var = 2 HotKeySet ("{F6}", "Simple1") HotKeySet ("{F7}", "Simple2") Case Else HotKeySet ("{F6}", "Simple1") HotKeySet ("{F7}", "Simple2") EndSelect What am I doing wrong? Is the script just ending itself as soon as it runs? How do I add a simple "wait for my command" function? I tried putting a "Sleep" function in the var2 and Else areas, but that didn't seem to help much - the sleep function means the script stops running and accepting input, right? Thanks for any help. Edited July 1, 2013 by 0pie Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 1, 2013 Moderators Share Posted July 1, 2013 0pie,Welcome to the AutoIt forum.Please read the Forum rules, particularly the section regarding game automation, before posting again. Link to comment Share on other sites More sharing options...
Recommended Posts