Malse Posted August 22, 2007 Share Posted August 22, 2007 Ok, So I'm needing a script, That turns on when i hit Home, and turns off when i hit End.Now for the most part i think it got it, but its not working and i don't see anything like it anywhere, So, Can you please help me with it. ThanksHere is my codeHotkeyset("{HOME}","start") Hotkeyset("{END}","stop") Func start() Send("{TAB}") Send("3") Sleep(10000) Send("{SPACE}") Send("{SPACE}") Send("{SPACE}") Send("{SPACE}") Send("8") Sleep(10000) Send("{LEFT}") MouseMove (300,500) MouseMove (400,400) EndFunc Func stop() exit EndFuncI need the Start to Loops over and over, and then the Stop, is of coarse to stop the loop.>>Here is the script file.<<Any ideas or help would be much appreciated.Cya! Link to comment Share on other sites More sharing options...
Arterie Posted August 22, 2007 Share Posted August 22, 2007 Hi!Try this worked fine for me:Hotkeyset("{HOME}","start")Hotkeyset("{END}","stop")While 1 Sleep(10) WEndFunc start()Send("{TAB}")Send("3")Sleep(10000)Send("{SPACE}")Send("{SPACE}")Send("{SPACE}")Send("{SPACE}")Send("8")Sleep(10000)Send("{LEFT}")MouseMove (300,500) MouseMove (400,400)EndFuncFunc stop() exitEndFunc Link to comment Share on other sites More sharing options...
Malse Posted August 22, 2007 Author Share Posted August 22, 2007 Ok, I just tried that, Works great, But it doesn't loop the start... it stops after one pass, How do i loop it? Link to comment Share on other sites More sharing options...
weaponx Posted August 22, 2007 Share Posted August 22, 2007 While 1 start() Sleep(10) WEnd Link to comment Share on other sites More sharing options...
ssubirias3 Posted August 22, 2007 Share Posted August 22, 2007 Ok, I just tried that, Works great, But it doesn't loop the start... it stops after one pass, How do i loop it?Are you wanting this to sit idle until you press the HOME or END keys? If so then what you have should work fine. The reason it stops after one pass is because you pressed END which says to Exit (stop/kill/end/exit script). On the other hand if you want the script to loop the start() function without pressing the HOME key, then what weaponx gave you is on target. However then it doesn't really make much sense to have the start() function tied to a hotkey... if you know what I mean. Here's your script cleaned up just a bit. Read the Send command help file and you'll understand my changes better. Hotkeyset("{HOME}","start") Hotkeyset("{END}","stop") While 1 Sleep(10) WEnd Func start() Send("{TAB}3") Sleep(10000) Send("{SPACE 4}8") Sleep(10000) Send("{LEFT}") MouseMove (300,500) MouseMove (400,400) EndFunc Func stop() exit EndFunc Link to comment Share on other sites More sharing options...
Arterie Posted August 22, 2007 Share Posted August 22, 2007 (edited) I don't really understand you... do you want to loop the startfunction? 1 way is to press {Home} more often or to put a do-loop in like weaponx or this Func start() Do Send("{TAB}3") Sleep(10000) Send("{SPACE 4}8") Sleep(10000) Send("{LEFT}") MouseMove (300,500) MouseMove (400,400) $func = $func + 1 Until $func = 10 EndFunc Or do you want to only stop the startfunction with the {End} button and not the script? Edited August 22, 2007 by Arterie Link to comment Share on other sites More sharing options...
Malse Posted August 22, 2007 Author Share Posted August 22, 2007 While 1start() Sleep(10) WEndWorks Thanks champ! 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