bechtudo

programs stop early

24 posts in this topic

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 is

AU3Check ended.rc:0

and Exit code:   0

Share this post


Link to post
Share on other sites



excuse me?

Share this post


Link to post
Share on other sites

I try to understand your comment or your question?

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

here it is:

; Set the Escape hotkey to terminate the script.
HotKeySet("{ESC}", "_Terminate")
$var1=0

While $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+1
WEnd


Func _Terminate()
    Exit

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

If you want it to run forever, don't constrain the loop...just do a:

While True
Wend

Or, delete the increment to the counter at the end of the loop.

Edited 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.

Share this post


Link to post
Share on other sites

I did a While True

Wend

 

same result, i guess it is ,my computer.

Share this post


Link to post
Share on other sites

#12 ·  Posted (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)

WEnd

This 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 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.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Thank you - it ran 3 times and ended. Thansk for trying.

Edited by bechtudo

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

No I did not touch the computer, just started the script and watched. 

Share this post


Link to post
Share on other sites

#16 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

I have two monitors and the scite window is on one monitor and the clicks happen on the second monitor.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I had recently my scanner identifying Autoit as a potential threat but I told the program to allow it to run all the time.

Share this post


Link to post
Share on other sites

#20 ·  Posted (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
endfunc

ps. You forgot to close your terminate function with endfunc.

Edited by BetaLeaf
Added sample script.

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

SoundBoard - Play any song or sound you want at the press of a hotkey.

My GitHub Page: https://github.com/BetaLeaf

Share this post


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