Jump to content

Problem with ControlSend and holding shift - (Locked)


inittab
 Share

Recommended Posts

Sorry if this is covered somewhere, I searched but wasn't able to find anything.

I wrote a very small script to launch my minecraft server, then once running run some commands on the server, back it up, then run some more commands. The problem comes when I'm actually playing the game. I tend to hold shift a lot when playing not to fall off things, this ends up with the commands being sent to the server having random capitals when i'm playing. Is there a way around this?

ex: "say Backing up World" might end up as "say BackING UP WORLD" or "sAY BACKING UP WORLD" in which case the command does not run correctly

save-off becomes SAVE_OFF etc.

 

Any help is appreciated.

Run("start.bat")
WinWaitActive("minecraft")
Sleep(15000)
While 0 <= 1
   ControlSend("minecraft","","","say Backing up World{Enter}")
   ControlSend("minecraft","","","save-off{Enter}")
   ControlSend("minecraft","","","save-all{Enter}")
   Sleep(10000)
   Run("backup.bat",@SW_HIDE)
   Sleep(10000)
   ControlSend("minecraft","","","say World Backup Complete.{Enter}")
   ControlSend("minecraft","","","save-on{Enter}")
   Sleep(1200000)
WEnd

 

Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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