Sign in to follow this  
Followers 0
Jeinz

Restarting a script.

6 posts in this topic

Yes, as the topic says, how do I restart a script?

I'm pretty new to the program so please bear over with me if this question is too "noobish" :whistle:

Hope you can help me guys, thx.

Share this post


Link to post
Share on other sites



Mhz had a good way here, here's an example I was showing someone using his technique if you mean restart from within the script itself:

http://www.autoitscript.com/forum/index.ph...st&p=159442


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Welcome,

Like restarting your script into an endless loop of restarts and finally your system dies for lack of resources?

To prevent such an event, would you like to specify what you needs are. As to why the restart is needed. Then perhaps a simple code example could be suggested for you.

:whistle:

Edit:

I am not sure if that code is suitable or not for Jeinz :) . But is a nice example.

Edited by MHz

Share this post


Link to post
Share on other sites

Hi, first of all, thanks for answering me

Well, the thing is that I'm working on a script that restarts the trial of a program I have... It's a long story, but the bottomline is that I need something that restarts the script. The script is very short and basic:

MouseClick("left", 56, 632, 2)

sleep(500)

MouseClick("left", 252, 222, 2)

sleep(500)

MouseClick("left", 250, 103, 2)

sleep(500)

MouseClick("left", 402, 429, 2)

You see? :whistle:

So I just need something that restarts it so after MouseClick("left", 402, 429, 2) it will go back to MouseClick("left", 56, 632, 2) .

Thanks.

Share this post


Link to post
Share on other sites

So I just need something that restarts it so after MouseClick("left", 402, 429, 2) it will go back to MouseClick("left", 56, 632, 2) .

O.K. I think we need a GOTO here, right? :whistle::)

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Something like this?

$theCowsComeHome = 0
Do
    MouseClick("left", 56, 632, 2)
    sleep(500)
    MouseClick("left", 252, 222, 2)
    sleep(500)
    MouseClick("left", 250, 103, 2)
    sleep(500)
    MouseClick("left", 402, 429, 2)
Until $theCowsComeHome


BlueBearrOddly enough, this is what I do for fun.

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
Sign in to follow this  
Followers 0