I have an atp4
automise project file. When I double click on it an ATCMD.exe
window pops up and executes the script, but immediately closes upon completion.
I would like to see what's going on during the execution, and therefore would like the runtime window to stay open so I can see what it's output is.
How can I prevent the window from closing after it finishes executing the script?
I don't know atp4
but with a batch script you should be able to get what you want (the cmd
tag implies you have Windows command prompt available). All you'll have to do in your batch script is put the name of your atp4
automise project file (use double quotes if it contains spaces), add a pause
under it and save it with a .bat
extension in the same directory as your atp4
automise file. You can then double-click on the batch-file and it will launch your atp4
automise project file and call the pause
command after it. The pause
will cause the command window to remain open untill you press on a key. Your batch-file should look like this:
@echo off
"<name_and_ext_atp4_automis_file>"
pause
The @echo off
is not mandatory but it prevents the cmd
to print each command it executes in your batch-file.
If you prefer that only the Enter key can make you "exit" the window, you can replace pause
with set /p =Press the Enter key to exit...
. set /p
normally waits on input from the user to set a variable with it (user's input ends when he/she presses enter). set /p
without giving a variable to store the input in is as telling cmd to wait untill the user presses enter.
EDIT: There is a little remark I'd like to add. Normally in windows the path to a file should be enough to call the program that should open it (the program linked to the file extension is called automatically). It should have the same effect as double clicking on the file in the explorer GUI but some files (like batch scripts) may need some additional commands to make it "go smooth" inside a batch script too. As I don't know atp4
I cannot control it for this case. I'd advise you to try out the script and maybe indicate in the comments if it worked fine.