Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: "Enter" COmmand within a .bat  (Read 5797 times)

0 Members and 1 Guest are viewing this topic.

stuartjk

  • Guest
"Enter" COmmand within a .bat
« on: November 06, 2005, 02:09:59 AM »
I have a batch file for my counter strike serverseen below:

HldsUpdateTool.exe -command update -dir \
call wait 30
HldsUpdateTool.exe -command update -game "Counter-Strike Source" -dir \srcds
start /high \srcds\srcds -game cstrike
start \srcds\srcdsfpsboost
HldsUpdateTool.exe -command update -game "hl2mp" -dir \srcds
HldsUpdateTool.exe -command update -game "dods" -dir \srcds
HldsUpdateTool.exe -command update -game "cstrike" -dir \hlds
HldsUpdateTool.exe -command update -game "czero" -dir \hlds
HldsUpdateTool.exe -command update -game "dmc" -dir \hlds
HldsUpdateTool.exe -command update -game "dod" -dir \hlds
HldsUpdateTool.exe -command update -game "gearbox" -dir \hlds
HldsUpdateTool.exe -command update -game "ricochet" -dir \hlds
HldsUpdateTool.exe -command update -game "tfc" -dir \hlds
HldsUpdateTool.exe -command update -game "valve" -dir \hlds

As you can see lines 4 and 5 execute the server after the update but I like to use the steam gui. This when using the gui (ie, imotting -comsole from the srcds start command line) it does not auto execute the server, however all that is neededis to press enter as soon as the interface loads up.

Is there any way I can get the batch to emulate the "enter" command so it automatically kicks off the server?

Thanks

stuartjk

  • Guest
Re: "Enter" COmmand within a .bat
« Reply #1 on: November 06, 2005, 02:17:01 AM »
Quote
ie, imotting -comsole


Sorry guys should have been "ie, omitting -console"

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: "Enter" COmmand within a .bat
« Reply #2 on: November 06, 2005, 08:14:45 AM »
You could try echo. | start ... in front of each of your start commands. If srcds and srcdsfpsboost are DOS programs this might work. If they are Windows programs, I doubt it will work. In any case, the start command itself may prevent anything from being passed to the started programs.

Hope this helps.  8)
« Last Edit: November 06, 2005, 08:15:02 AM by Sidewinder »
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

stuartjk

  • Guest
Re: "Enter" COmmand within a .bat
« Reply #3 on: November 06, 2005, 08:24:50 AM »
Thakss for that but, srcds can be either dos (console) or windows (gui) unfortunately I favour gui so never mind.