It works...however - I have a question.
Closing out the program usually isn't done with the GEM window and this is what I'm after - or something more flexible than gemkeyboard as a quit method.
Closing using the terminal running the patch creates problems with the GEM window and then I have to force-quit it. (I don't want to see the terminal window anyway).
The files are attached. The script will need to adjusted though. (This was done in OSX).