beekeeper222 Posted May 30, 2020 Share Posted May 30, 2020 Is there a way to put it into one loop? I need to add 73 pixels to x direction after running 10 times. $OriginalX = MouseGetPos(0) $OriginalY = MouseGetPos(1) $MoveX = 0 $MoveY = -73 For $i = 0 To 10 MouseMove(403,964) MouseClick("left") MouseMove($OriginalX + $MoveX*$i, $OriginalY + $MoveY*$i) Sleep(500) Next For $i = 0 To 10 MouseMove(476,964) ;403+73 MouseClick("left") MouseMove($OriginalX + $MoveX*$i, $OriginalY + $MoveY*$i) Sleep(500) Next For $i = 0 To 10 MouseMove(549,964);403+73*2 MouseClick("left") MouseMove($OriginalX + $MoveX*$i, $OriginalY + $MoveY*$i) Sleep(500) Next etc Link to comment Share on other sites More sharing options...
careca Posted May 30, 2020 Share Posted May 30, 2020 $OriginalX = MouseGetPos(0) $OriginalY = MouseGetPos(1) $MoveX = 0 $MoveY = -73 $InitialX = 403 For $x = 0 To 10 For $i = 0 To 10 MouseMove($InitialX,964) MouseClick("left") MouseMove($OriginalX + $MoveX*$i, $OriginalY + $MoveY*$i) Sleep(100) Next $InitialX = $InitialX = +73 next Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Musashi Posted May 30, 2020 Share Posted May 30, 2020 (edited) 2 hours ago, beekeeper222 said: I need to add 73 pixels to x direction after running 10 times. I assume you are still working on the Excel script from your other post https://www.autoitscript.com/forum/topic/202907-multiplying-variable-every-loop/?do=findComment&comment=1456764 . If yes, then these are exactly the unreliabilities that were mentioned there. Again, I recommend using the Excel UDF, otherwise you're constantly tinkering with your code. Edited May 30, 2020 by Musashi typo "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." 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