Jump to content
Sign in to follow this  
communist

Repeat

Recommended Posts

yes yes, i need help (again) :lmao:

anyway, what i wanna do is, make a program click something 50 times, click on a difrent location, and repeat that (click 50x + click) 30 times.

what i came up with is:

For $i = 1 to 30

For $i = 1 to 50

MouseClick( "left" , 485 , 435 , 1 , 1)

Sleep(50)

Next

sleep(2000)

MouseClick( "left" , 540 , 520 , 1 , 1)

sleep(2000)

Next

but, as you can see, it doesn't really work, some1 have any idea how to do this?

Share this post


Link to post
Share on other sites

;repeat that 30 times.
For $L1 = 1 to 30
  ;make a program click something 50 times
   For $L2 = 1 To 50
      MouseClick( "left" , 485 , 435 , 1 , 1)
      Sleep(50)
   Next
   sleep(2000)
  ;click on a difrent location
   MouseClick( "left" , 540 , 520 , 1 , 1)
Next

Share this post


Link to post
Share on other sites

;repeat that 30 times.
For $L1 = 1 to 30
  ;make a program click something 50 times
   For $L2 = 1 To 50
      MouseClick( "left" , 485 , 435 , 1 , 1)
      Sleep(50)
   Next
   sleep(2000)
  ;click on a difrent location
   MouseClick( "left" , 540 , 520 , 1 , 1)
Next

<{POST_SNAPBACK}>

thx! :lmao:

Share this post


Link to post
Share on other sites

;repeat that 30 times.
For $L1 = 1 to 30
  ;make a program click something 50 times
   For $L2 = 1 To 50
      MouseClick( "left" , 485 , 435 , 1 , 1)
      Sleep(50)
   Next
   sleep(2000)
  ;click on a difrent location
   MouseClick( "left" , 540 , 520 , 1 , 1)
Next

<{POST_SNAPBACK}>

That should work well, I was looking for something similar to this aswell, thanks SlimShady :lmao:

Is there any way to keep track of the number of cycles or times repeated while the script is running?


Thanks to Wolvereness for putting up with me and helping me ^_^

Share this post


Link to post
Share on other sites

During runtime you can use the variables $L1 and $L2.

You can change them ofcourse or assign them to another variable.

Edit:

For people who did not understand what I just said:

I'll edit the above example to explain it.

Example 1

;repeat that 30 times.
For $L1 = 1 to 30
 ;make a program loop 50 times
   For $L2 = 1 To 50
      MsgBox(64, "Test - $L2 Loop", "$L2 contains " & $L2 & " now.")
      Sleep(50)
   Next
   sleep(2000)
   MsgBox(64, "Test - $L1 Loop", "$L1 contains " & $L1 & " now.")
Next

Example 2

;repeat that 30 times.
For $L1 = 1 to 30
 ;make a program loop 50 times
   For $L2 = 1 To 50
      $val2 = $L2
      MsgBox(64, "Test - $L2 Loop", "$val2 contains " & $val2 & " now.")
      Sleep(50)
   Next
   sleep(2000)
   $val1 = $L1
   MsgBox(64, "Test - $L1 Loop", "$val1 contains " & $val1 & " now.")
Next
Edited by SlimShady

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...