Jump to content

Recommended Posts

Posted

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.

 
 
 
Quote

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

Func _Terminate()
    Exit
EndFunc   ;==>_Terminate

 

Any ideas?

Posted (edited)

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

 

Posted

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? 

Posted

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.

  • Developers
Posted (edited)
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.

*click*

Jos

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.
  :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...