Sign in to follow this  
Followers 0
Kellyle

How to properly go to function / loop

7 posts in this topic

I've read the documentation but english is not my native language, i have not understand it correctly.

I could use some help please;

Following code

;~ ===================================
;~ Opening mail
;~ ===================================
MouseClick("left")
sleep(random(112, 333))
MouseMove(1324 + Random(1,4),370 + Random(1,2),21) ;~ Here is line R10
sleep(random(211, 410))
Mouseclick("left")
sleep(random(200, 310))
MouseMove(947 + Random(1,2),759 + Random(1,4),51)
sleep(random(100, 200))
Mouseclick("left") ;~ When here is done, i want to go back to line R10

When is correctly done, can i add how many checks; if yes, then how to continue my script after (x) checks.

Thanks for helping beginner  :bye:

Share this post


Link to post
Share on other sites



For calling a function again and again in a specific time, look into the helpful for: AdLibRegister and AdLibUnRegister


Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I've read the documentation but english is not my native language, i have not understand it correctly.

I could use some help please;

Following code

;~ ===================================
;~ Opening mail
;~ ===================================
MouseClick("left")
sleep(random(112, 333))
MouseMove(1324 + Random(1,4),370 + Random(1,2),21) ;~ Here is line R10
sleep(random(211, 410))
Mouseclick("left")
sleep(random(200, 310))
MouseMove(947 + Random(1,2),759 + Random(1,4),51)
sleep(random(100, 200))
Mouseclick("left") ;~ When here is done, i want to go back to line R10

When is correctly done, can i add how many checks; if yes, then how to continue my script after (x) checks.

Thanks for helping beginner  :bye:

 

For calling a function again and again in a specific time, look into the helpful for: AdLibRegister and AdLibUnRegister

 

Thanks but i simply search a solution instead of repeating my lines again two or three times, i would like to repeat the following 3 times then continue the script.

A crude example;

Start
MouseMove(1324 + Random(1,4),370 + Random(1,2),21)
sleep(random(211, 410))
Mouseclick("left") End, Goto "start -> end" 2 times more, then continue
Edited by Kellyle

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

But the lines u like to repeat in a function, loop it with AdLibRegister, and when the specific reason to go on takes place, then AdLibUnRegister your function and execute the code after that...

Excuse typos: I am on phone.

Edited by MadaraUchiha

Share this post


Link to post
Share on other sites

Take a look at For...Next

Share this post


Link to post
Share on other sites

*specific


Share this post


Link to post
Share on other sites

But the lines u like to repeat in a function, loop it with AdLibRegister, and when the specific reason to go on takes place, then AdLibUnRegister your function and execute the code after that...

Excuse typos: I am on phone.

 

Thanks you now i understand

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0