Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit or close scripts

Status
Not open for further replies.

marty1452

Technical User
Jun 11, 2002
102
US
I need some help on what appears to be a simple task, closing the application. I can't control the location of where someone might be in an extensive application when they decide to exit so I connected all exit scripts to point to file 10 to close. I was thinking that controling how the application closes would be the right thing to do.

I have a close script like this in file #10:

Close ["file 1"]
Close ["file 2"]
Close ["file 3"]
Close ["file 4"]
Close ["file 5"]
Close ["file 6"]
Close ["file 7"]
Close ["file 8"]
Close ["file 9"]
Close ["file 10"]

Each files 1-9 contain a script like this:

Perform Script [Subscript,"File 10"] which calls the above script.

Then in the application preferences I set an additional exit script to perform on exit of File 10.

This exit script contains "Exit Application". So I thought File 10 would close itself as a final script step and because it closes it would call an exit application script.
In my mind, I thought I covered all my bases. When I produce this in Runtime, it appears to close the application fine, but upon re-entering the application, I get several banners that the file was not closed properly and some may even require integrity checks. I can again exit the application without doing anything, and upon re-entry, the same file not closed properly and intergrity checks are performed again.

What could I be missing?

The only other thing I should mention, is not all files may be opened when I call the script to close them. Could this cause an error on an un-opened file?

Thanks

Marty
 
I found my own answer. Files 1-9 also had a close on exit script requesting File 10 to close. This close would cause the a shut down without proper closing of the files.

I put the on exit close file 10 to trying to capture some user closing the file by clicking on the the windows X's. I guess you can't watch everything.

Thanks

Marty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top