mnemonic Posted December 30, 2005 Share Posted December 30, 2005 Hi. trying to make a script that loops sending some keystrokes like every 30 sec or so. to be specific I want the script to send the following keys and mouseclicks. a 5 followed by a right mouse click pause for 20 secs and then repeat preferably I would like this so I can toggle the script on and off with a hotkey and maybe also that it can be incorporated in a scripf file along with other future similar macros. Btw, I have been struggling myself with the help files etc to do this but Im not a coder. I can get it to work sortof but the loop is malfunctiong........... Help a poor new member. Thanks Link to comment Share on other sites More sharing options...
NegativeNrG Posted December 30, 2005 Share Posted December 30, 2005 Try This: Hotkeyset("{HOME}","start") Hotkeyset("{END}","stop") Func start() $start = 0 DO Send("{5}") MouseClick("right") Sleep(20000) Until $start = 1 EndFunc Func stop() if $start = 0 Then $start = 1 Else $start = 0 Endif EndFunc [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
mnemonic Posted December 30, 2005 Author Share Posted December 30, 2005 thanks Link to comment Share on other sites More sharing options...
mnemonic Posted December 30, 2005 Author Share Posted December 30, 2005 altho I cant get it to work............. am I an idiot or does anyone see any errors in the script? Try This: Hotkeyset("{HOME}","start") Hotkeyset("{END}","stop") Func start() $start = 0 DO Send("{5}") MouseClick("right") Sleep(20000) Until $start = 1 EndFunc Func stop() if $start = 0 Then $start = 1 Else $start = 0 Endif EndFunc Link to comment Share on other sites More sharing options...
BigDod Posted December 30, 2005 Share Posted December 30, 2005 Try Hotkeyset("{HOME}","start") Hotkeyset("{END}","stop") dim $start while 1 sleep(100) WEnd Func start() $start = 0 DO Send("{5}") MouseClick("right") Sleep(20000) Until $start = 1 EndFunc Func stop() if $start = 0 Then $start = 1 Else $start = 0 Endif EndFunc You need the loop to keep the script alive. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother 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