Sign in to follow this  
Followers 0
T1Cybernetic

Restart an exited script?

2 posts in this topic

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("{ENTER}")
    Send("AEG Recruiting Kurzicks at http://www.t1cybernetic.co.uk",500)
    Send("{ENTER}")
    Sleep(1800000)
EndFunc

While 1
    Advertise()
WEnd

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  
Followers 0