| View previous topic :: View next topic |
| Author |
Message |
godsstigma
Joined: 04 Nov 2008 Posts: 222 Location: Memphis, TN
|
Posted: Fri Feb 12, 2010 1:53 pm Post subject: Application close notify |
|
|
Is there anyway for a script/executable to know if it is being closed via taskman or the command line, and if so can we pause the termination to execute some code beforehand?
Further explanation:
I have a script that hides/shows windows. If this script is terminated by means other than through the script, the hidden windows will stay in that state until the script is executed again. |
|
| Back to top |
|
 |
jorgy Guest
|
Posted: Fri Feb 12, 2010 2:50 pm Post subject: |
|
|
| Look in the help file for "OnExit". With it you can detect when the script is closing and the reason for the close. You can then take approriate action before the script terminates. |
|
| Back to top |
|
 |
godsstigma
Joined: 04 Nov 2008 Posts: 222 Location: Memphis, TN
|
Posted: Fri Feb 12, 2010 3:34 pm Post subject: |
|
|
Thanks, but I have reviewed the help file.
The first line in the "OnExit" help page:
| Quote: | | The OnExit subroutine is called when the script exits by any means (except when it is killed by something like "End Task"). |
"End Task" would be referring to the task manager or command line.
The only thing i can think of is maybe monitoring a system message?
Any suggestions? |
|
| Back to top |
|
 |
|