Kiti Posted July 2, 2008 Share Posted July 2, 2008 (edited) Here's my code: $speed = 2 Global $x = 1 If $x = 1 Then For $1 = 0 To 14 MouseMove(788, 630 + $1 * 5, $speed) For $2 = 0 To 14 MouseMove(788 + $2 * 5, 630 + $1 * 5, $speed) $cursor = MouseGetCursor() If $cursor = 11 Then Global $x = 2 EndIf Next Next EndIf The SciTe's console is in mouse's way, but when he turns in a vertical resizing arrow, the script doesn't exit. Do you know why? Edit: If I put a msgbox instead of declaring $x, I get it. So that declaration doesn't influence the first if loop. Is there anything like ExitAllLoops ? If I put an ExitLoop it exits only the 3rd/last one. How can I exit the entire loop if the mouse changes? Edited July 2, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
narayanjr Posted July 2, 2008 Share Posted July 2, 2008 By the time it would set $x to 2 it is already inside the loops so it wont stop until it is done If you want it to exit the loops when it finds the cursor add this in in ExitLoop 2oÝ÷ Ù§íz»ay«¢+Ù±½°ÀÌØíàô Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 2, 2008 Share Posted July 2, 2008 (edited) The $x variable doesn't do anything in the script you posted so unless it's used somewhere else (or have some other mysterious meaning ) you may as well remove it Edited July 2, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Kiti Posted July 2, 2008 Author Share Posted July 2, 2008 The $x variable doesn't do anything in the script you posted so unless it's used somewhere else (or have some other mysterious meaning ) you may as well remove it ) No, it doesn't. I just want to click and exit the loop when the cursor chages. Here's my workaround : For $1 = 0 To 14 MouseMove(788, 630 + $1 * 5, $speed) For $2 = 0 To 14 MouseMove(788 + $2 * 5, 630 + $1 * 5, $speed) global $cursor = MouseGetCursor() if $cursor = 0 Then MouseClick("Left") sleep(100) _mousetrap(0,0,10,10) EndiF Next Next Even though it waits till all the movements are finished, it click ony once, and that's what I need. Thank you narayanjr for your help! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 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