Jump to content

Input into cmd.exe


 Share

Recommended Posts

I am trying to use AutoIT to input "say server will be restarting blah blah" with

If WinExists("C:\Windows\system32\taskeng.exe") Then
WinActivate("C:\Windows\system32\taskeng.exe")
Send("say The Protoss Survival Server is now up and running. The issue on 1-17-12 with the server not saving has now been corrected.")
Send("{Enter}")
Sleep(1800000)
Send("say If you have any suggestions about the server please post on tinyurl.com/protoss33. This is the forum post in the Minecraft Forums.")
Send("{Enter}")
Send("save-all")
Send("{Enter}")
EndIf

I have tried using both \taskeng.exe" and \cmd.exe". The problem is that when I use windows scheduler to start this .bat

@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx1G -jar craftbukkit-1.1-R1-SNAPSHOT.jar
PAUSE

The .bat runs normally when manually opened. But windows scheduler starts it hidden, so AutoIT doesn't input the commands in the script.

Anyone have any ideas on doing this? Someone suggested a "wrapper" or using vbs. Thanks.

Link to comment
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
 Share

  • Recently Browsing   0 members

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