bechtudo Posted January 13, 2016 Share Posted January 13, 2016 I have several recorded programs which only run for a littel bit and just stop. I have loops in there which ran in the past when I wanted this all night long but now they just stop after 2 or 3 times. Any idea what's happening here. The message I get isAU3Check ended.rc:0and Exit code: 0 Link to comment Share on other sites More sharing options...
JohnOne Posted January 13, 2016 Share Posted January 13, 2016 Error on line 342 maybe? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 excuse me? Link to comment Share on other sites More sharing options...
JohnOne Posted January 13, 2016 Share Posted January 13, 2016 Why what have you done? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 I try to understand your comment or your question? Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 (edited) We can only speculate without your script. We would also need the reason for exiting the loop, or failing, or blowing up.Any advice anyone gives you will be a waste of time without more info. We can't see through your eyes, or read minds. Edited January 13, 2016 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 here it is:; Set the Escape hotkey to terminate the script.HotKeySet("{ESC}", "_Terminate")$var1=0While $var1<25 MouseClick("left",1129,601,1) MouseClick("left",1128,584,1) MouseClick("left",1128,566,1) MouseMove(1133,551) MouseDown("left") MouseMove(1136,551) MouseUp("left") MouseClick("left",1134,537,1) Sleep(1000) MouseClick("left",1133,518,1) Sleep(1000) MouseClick("left",1129,496,1) Sleep(27000) $var1=$var1+1WEndFunc _Terminate() Exit Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 (edited) I assure you that your script will run through the loop exactly 25 times without fail.But, since you are doing actions that provide no feedback, you are probably correct that it only runs what you think is 'successfully' a few times.What are you automating...use the win* and control* or _ie* functions to more reliable 'do' what you need to do. Edited January 13, 2016 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 what I don't understand is the script ran exactly 26 times without fail but not any more. All i do is simulate some mouse clocks. Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 (edited) If you want it to run forever, don't constrain the loop...just do a:While True WendOr, delete the increment to the counter at the end of the loop. Edited January 13, 2016 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 I did a While TrueWend same result, i guess it is ,my computer. Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 (edited) ....While True MouseClick("left",1129,601,1) MouseClick("left",1128,584,1) MouseClick("left",1128,566,1) MouseMove(1133,551) MouseDown("left") MouseMove(1136,551) MouseUp("left") MouseClick("left",1134,537,1) Sleep(1000) MouseClick("left",1133,518,1) Sleep(1000) MouseClick("left",1129,496,1) Sleep(27000) WEndThis runs FOREVER...if your response is 'it only does it a few times', then you better elaborate on what you are automating and what "IT" is!! Edited January 13, 2016 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 (edited) Thank you - it ran 3 times and ended. Thansk for trying. Edited January 13, 2016 by bechtudo Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 let me guess...you pressed your hotkey to exit the script. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 No I did not touch the computer, just started the script and watched. Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 (edited) It's logically impossible for my EXACT script I provided you to run only 3 times. Unless the clicks happen to hit something on the scite window that stops the script execution....Maybe you have a virus scanner that is killing your script execution. Edited January 13, 2016 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 I have two monitors and the scite window is on one monitor and the clicks happen on the second monitor. Link to comment Share on other sites More sharing options...
jdelaney Posted January 13, 2016 Share Posted January 13, 2016 Do you have a virus scanner that's terminating your script. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
bechtudo Posted January 13, 2016 Author Share Posted January 13, 2016 I had recently my scanner identifying Autoit as a potential threat but I told the program to allow it to run all the time. Link to comment Share on other sites More sharing options...
EmilyLove Posted January 13, 2016 Share Posted January 13, 2016 (edited) Try this:; Set the Escape hotkey to terminate the script. HotKeySet("{ESC}", "_Terminate") for $i = 1 to 25 MouseClick("left",1129,601,1) MouseClick("left",1128,584,1) MouseClick("left",1128,566,1) MouseMove(1133,551) MouseDown("left") MouseMove(1136,551) MouseUp("left") MouseClick("left",1134,537,1) Sleep(1000) MouseClick("left",1133,518,1) Sleep(1000) MouseClick("left",1129,496,1) Sleep(27000) next Func _Terminate() Exit endfuncps. You forgot to close your terminate function with endfunc. Edited January 13, 2016 by BetaLeaf Added sample script. 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