Jump to content
Sign in to follow this  

Need help with a loop Script that simply wont loop

Recommended Posts

So before this gets flagged for game automation it has nothing to do with gameplay. This is a script I'm writing to autosave a server I'm running without using plugins so I can keep the server running purely vanilla. 

I basically want it to open the games console window if it's not already open and type save and hit enter every 5 mins. 

It works great when I run it however it only runs once. 

I've tried many different ways to write the script but it just won't loop.


$run = 1
HotKeySet("{ESC}", "_Terminate")
Opt("TrayAutoPause", 0)
While $run = 1
WinWait("[CLASS:ConsoleWindowClass]", "")
If Not Winactive("[CLASS:ConsoleWindowClass]", "") Then WinActivate("[CLASS:ConsoleWindowClass]", "")

Func _Terminate()
EndFunc   ;==>_Terminate


Any ideas?

Share this post

Link to post
Share on other sites

Did you actually read the forum rules? It may still get locked 

Edited by Earthshine

My resources are limited. You must ask the right questions


Share this post

Link to post
Share on other sites

Yeah, I read them this is interfacing with a console, not a game. If I did not tell you upfront what I'm doing you would have no idea what this is for should I resubmit the topic and lie? to appease people like you who have nothing of value to bring to the table? 

Share this post

Link to post
Share on other sites

Listen, it's not a matter of wanting or not wanting, it's a mater of obeying the rules and conduct put forth by the forum mods.  Don't act like we're the one's being uncooperative.

Share this post

Link to post
Share on other sites
4 hours ago, GrimChemist said:

Fuck it ill code the script in c# if you guys don't want to help

Sure ...you too. ;)  ,,, and goodluck with that.

1 hour ago, GrimChemist said:

There is no logic in the rule, I'm sure you are fine with that.

There is so NO.



Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...