Create a Batch File to Close/Launch/Reopen Programs

AI Thread Summary
Creating a batch file to close specific programs, launch a game, and then reopen the closed programs upon the game's exit presents challenges. While it is possible to close programs and start a game using a batch file, restarting the programs after the game exits requires event synchronization that batch files do not support. Batch files are designed for executing a sequence of commands rather than responding to events. For more complex tasks, such as detecting when a game closes and triggering actions based on that, using a scripting language like VBScript is recommended, as it is better suited for handling such event-driven scenarios.
jpfuse
Messages
1
Reaction score
0
i don't know if this is even the right forum but i am trying to right a batch file which will close certain running programs, launch a game, and upon exit of the game, run the programs that were closed. i know how to close a prog and open the game, but i don't know how to run the progs when the game exits.
 
Computer science news on Phys.org
i don't know if this is even the right forum but i am trying to right a batch file which will close certain running programs, launch a game, and upon exit of the game, run the programs that were closed. i know how to close a prog and open the game, but i don't know how to run the progs when the game exits.

I'm not real sure if that is doable, unless the game sends some kind of code on exit that could execute a batch file.

What game is it? What programs? Perhaps your best bet would be to simply create a batch file that executes your programs, then use this to start the programs, and a command within this batch starts the game and closes the programs.

As to restarting the programs when the game exits, I'm stumped.
 
I'm with Megashawn. You need some sort of event synchronization that runs when the game is shut down. What you are doing is beyond the scope of a batch file. Batch files are for triggering a series of events, not being triggered by those events. Although they can be made to have some structure, I recommend looking at something like VBScript that was meant for these kind of things.
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top