1.

Solve : Wacky Question with Batch files.?

Answer»

I used and edited batch files back in the day, but i can't remember if they can be used to wait on a program.

Reason why i ask, i have a keyremapper -autohotkey, that i use to rebind numpad keys to function keys. Of course this effectively eliminates the use of the keypad regularly.

so i want to run
autohotkey
game.exe

then have batch file wait on EXIT of game.exe
close autohotkey.exe

?? feedback would be GREAT!If you are used to batch files from the old MS-DOS & Win95/98/ME days, then you will find that the command language used in Windows NT family OSs (especially Windows 2000 onwards) VASTLY expanded and improved. So much so that it is MISLEADING to still call it "DOS".

Check out the START command, and its switches. You can open a command window and type start /? at the prompt to see a list of them. I think you will find the /WAIT switch most useful.

e.g.

start "" /WAIT "C:\Program Files\Game Folder\Game.exe"

As for starting and STOPPING Autohotkey, I am not familiar with this app, but I am sure you will find help in its own very good forum

http://www.autohotkey.com/forum

Just a thought... can't you run the game from the autohotkey script?

hey thanks for the reply!
yes i could, but i have no other use for autohotkey other than making this game manageable, although it is a very good idea, i'll look into it!I use another Windows automation tool, Autoit, and I often start apps from within scripts so that when the app finishes control is returned to the script, and when the script finishes and exits, it returns control to the batch script.



Discussion

No Comment Found