Jump to content

Recommended Posts

say i have this

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

While 1

For $i = 1 to 6.5

Sleep(6500)

MouseClick("right", 796, 360)

$i = $i + 1

Next

Wend

Func Terminate()

Exit

EndFunc

i want it to keep right clicking, but i also want it to do f1 once every couple minutes... how do i do that without having to copy and paste this lots of times and have 1 keystroke command??

Link to post
Share on other sites

1. What do you mean by "do f1 once every couple minutes" ?

2. In a For... Next loop, every time it loops it increments the variable with the value you gave Step (default 1)

So you don't have to do $i = $i + 1

That's why it doesn't make sense to do For $i = 1 to 6.5, because it increments the var $i every time by 1, but it will never reach 6.5

Try to to play with this script.

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

While 1
   For $l = 10 to 70 Step 10
      $i = $l / 10
      Sleep(65 * 100)
      MouseClick("right", 796, 360)
   Next
Wend

Func Terminate()
   Exit
EndFunc
Link to post
Share on other sites

The below script will step at a .5 interval so it will get 7 steps. I am hoping that is how many steps you were wanting. Let me know. After it has done the 7 steps it will Send() a F1 key press. Then go back and do 7 more steps.

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

While 1
  For $i = 1 To 3.5 Step .5
     Sleep(6500)
     MouseClick("right", 796, 360)
  Next
  Send("{F1}")
Wend

Func Terminate()
  Exit
EndFunc

I hope it helps,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...