lilandywandy Posted December 10, 2004 Share Posted December 10, 2004 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 comment Share on other sites More sharing options...
SlimShady Posted December 10, 2004 Share Posted December 10, 2004 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 + 1That'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.5Try 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 comment Share on other sites More sharing options...
JSThePatriot Posted December 10, 2004 Share Posted December 10, 2004 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 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