Jump to content
Sign in to follow this  

Restart an exited script?

Recommended Posts


I am having a hard time trying to explain this to myself so please bare with me :) I totally understand game automation is a no no around here although that being said the code is only for advertising recruiting new players (Nothing malicious or harmful in any way) so I hope and pray that isn't crossing a line :) Anyhow here goes.

1# How can I restart a script if it exit's prematurely while I am out of the house or otherwise afk?

;Gain control of guild wars window
Opt("TrayAutoPause", 1)
WinWait("Guild Wars", "")
If Not WinActive("Guild Wars", "") Then WinActivate("Guild Wars", "")
WinWaitActive("Guild Wars", "")

;Resize guild wars window
ControlMove("Guild Wars", "", 0, 0, 0, 800, 600)

Func Advertise()
    Send("AEG Recruiting Kurzicks at http://www.t1cybernetic.co.uk",500)

While 1

Now my problem is, For god only knows reasons that script sometimes just exit's. Is there a way I can run that through another script maybe or somehow restart it if it stops.

Can I run my recruiter script through a different autoit script and have it check/restart if it exits ?

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.