Bruuuuh

Counter

3 posts in this topic

#1 ·  Posted (edited)

Hello :)

I want to write a script, but im never worked with AutoIt before, so i dont know how to set a counter right. While it clicks on the coordinates the programm should count to 100, then sleep 30 seconds and then reset the counter to 0 and repeat it over and over. Hope you can help me
HotKeySet("{ESC}", "Terminate")
  While 1
   Dim $count = 0
      While $count < 100
         $count = $count + 1
While 1
MouseClick("left", 745, 805, 1, 14)
Sleep(800)
MouseClick("left", 540, 720, 1, 32)
MouseClick("left", 1125, 572, 2, 14)
MouseClick("left", 900, 635, 2, 25)
MouseClick("left", 700, 615, 1, 10)
MouseClick("left", 950,635, 1, 0)
Sleep(100)
WEnd
WEnd
WEnd
Func Terminate()
    Exit 0
EndFunc

 

Edited by Bruuuuh

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

Got it..

 

HotKeySet("{ESC}", "Terminate")

Dim $iCount = 0

While 1
While $iCount <= 20

         MouseClick("left", 745, 805, 1, 14)
         Sleep(800)
         MouseClick("left", 540, 720, 1, 32)
         MouseClick("left", 1125, 572, 2, 14)
         MouseClick("left", 900, 635, 2, 25)
         MouseClick("left", 700, 615, 1, 10)
         MouseClick("left", 950,635, 1, 0)
         sleep(100)
         $iCount = $iCount + 1
      WEnd
      While $iCount >= 20
         Sleep(15000)
         $iCount = 0
      WEnd
WEnd
Func Terminate()
    Exit 0
EndFunc

 

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