Script needs to wait for editing to be complete
Posted: Fri May 24, 2002 12:02 am
Usually, I want invoking TextPad when it is already running to open the file named on its command line in the existing instance. To achieve this I have unchecked "Allow multiple instances to run" at Configure/Preferences/General. Thus the second instance quits immediately after having handed off the file to the original instance.
Sometimes I call TextPad from a shell script (BAT file). In this case, I would like the script to wait until I have saved the file and closed its edit window--although not necessarily quit TextPad as a whole, since I may have other files open in it.
Is there a way to achieve this without changing the "Allow multiple instances to run" setting? For example, I would like my shell script to contain
textpad -wait filename.txt
which means that the script is not to continue until I close the edit window on that file.
Of course, if I were to check "Allow multiple instances to run" then my script could contain
start /w textpad.exe filename.txt
which would achieve almost what I want, except that now I would be opening every file in a separate TextPad session, which is not what I really want.
- Rich
Sometimes I call TextPad from a shell script (BAT file). In this case, I would like the script to wait until I have saved the file and closed its edit window--although not necessarily quit TextPad as a whole, since I may have other files open in it.
Is there a way to achieve this without changing the "Allow multiple instances to run" setting? For example, I would like my shell script to contain
textpad -wait filename.txt
which means that the script is not to continue until I close the edit window on that file.
Of course, if I were to check "Allow multiple instances to run" then my script could contain
start /w textpad.exe filename.txt
which would achieve almost what I want, except that now I would be opening every file in a separate TextPad session, which is not what I really want.
- Rich