Can I close the jmp program from a script?Hi
I have created an application in jmp. When the application is run, a series of hidden data tables is created, depending on the user input. When the user decides to close the application window, I would like to run a script to close these open tables before the application is closed. One way to achieve this is to disable the 'red cross' to close the window and define my own button to close the application. Now, how do I disable the ‘red cross’? I’m guessing I have to pass some kind of WinAPI command…
Thanks
Re: Can I close the jmp program from a script?That did the trick. Thank you!
Re: Can I close the jmp program from a script?Thanks to Dan Schikore for helping me with this same issue. In the script portion of Application Builder put the following code:
(thisModuleInstance<<GETBOX></GETBOX>
Obviously your statements will be different.
Re: Can I close the jmp program from a script?In the application builder each object, report, etc. is given a name, you should be able to attach the On Close to the appropriate object, including the overall applicationRe: Can I close the jmp program from a script?I guess I was over complicating things a bit. My next question: using the application builder, how do I create a reference to the application window? When I use the Current Window() command I get a reference to the Application Builder window, not to the application window it self.
Re: Can I close the jmp program from a script?w = New Window(.................................);
w << On Close(
loop through the data tables and close them
);
You can always use an On Close, to take action on an application window, that will save those tables.
Help==>Scripting Index==>On Close