Guest tanja Posted August 8, 2005 Share Posted August 8, 2005 (edited) I'm making simple script, and I want to: - send "2" (works) - put on right mouse button few times (works) - make 10 seconds break (that's my problem) - send "3" (works) - put on right mouse button few times (works) I tried to do break with "sleep" but can't (script is still working, but not "sleeping" when should). Code of this one function: $i = 0 func start() $i = 0 While $i <= 10 Send(2) MouseClick("right", 300, 400, 5) ; Here I want script to do nothing for 10 seconds... Send(3) MouseClick("right", 300, 400, 10) wend endfunc Oh, one question more: how to do something between few loops with code like this one? I mean I want to make for example five loops like this one, and then send "xyz", and again do five loops... Edited August 8, 2005 by tanja Link to comment Share on other sites More sharing options...
Josbe Posted August 8, 2005 Share Posted August 8, 2005 (edited) I'm making simple script, and I want to:- send "2" (works)- put on right mouse button few times (works)- make 10 seconds break (that's my problem)- send "3" (works)- put on right mouse button few times (works)I tried to do break with "sleep" but can't (script is still working, but not "sleeping" when should).Code of this one function:$i = 0 func start() $i = 0 While $i <= 10 Send(2) MouseClick("right", 300, 400, 5) ; Here I want script to do nothing for 10 seconds... Send(3) MouseClick("right", 300, 400, 10) wend endfunc<{POST_SNAPBACK}>Read about Sleep()If you need 10 secs., write:Sleep(10000) Edited August 8, 2005 by Josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Guest tanja Posted August 8, 2005 Share Posted August 8, 2005 (edited) Doesn't work as I said. I'll try to do it again but it won't... Here's other thing works like "sleep"? Maybe it can't be cause that's pretty fast loop and I've a few functions inside? (one key is starting one function what is looping without end). Edited August 8, 2005 by tanja Link to comment Share on other sites More sharing options...
Josbe Posted August 8, 2005 Share Posted August 8, 2005 Doesn't work as I said.I'll try to do it again but it won't...Here's other thing works like "sleep"? Maybe it can't be cause that's pretty fast loop and I've a few functions inside? (one key is starting one function what is looping without end).<{POST_SNAPBACK}>Doesn't work ?Show an error?Don't pause the script?Very fast/slow? AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
/dev/null Posted August 8, 2005 Share Posted August 8, 2005 Doesn't work as I said.I'll try to do it again but it won't...have you read the post of josbe? sleep() expects its argument in MILISECONDS, not seconds. So, if you want to sleep for 10 seconds, you'll have to specify a value of 10*1000 ==> sleep(10000) and NOT sleep(10).CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * 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