My script works just fine but I do get this exit code -2147023895. Any idea what this is? I believe the exit code should be wither 0 or 1.
Maybe I am using a function in the wrong context.
Your application sounds pretty interesting. The Behavior of "exit()" is puzzeling. Both Exit() and Quit() terminate the exitsting JMP session without returning anything unless there are tables that are open and unsaved. Then in that case you will see a dialog window to save, cancel, etc..
if "exit()" is commented out, does the script still return a numeric value?