Jump to content

Clean Launch and Closing Scripts


This topic is 6333 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Can anyone give me advice. I'm trying to find a clean way to launch and close my database. I have a window that I use to select from a projects list that always needs to be open. And I want the database to always close down and open up with that window as the only one there. Are there any best practices people use to get in and out of a dbase? I'm trying different methods but it seems pretty messy and inconsistent.

Any help is greatly appreciated!

Link to comment
Share on other sites

I get that part. But I'm having trouble writing a script that sorts through all the windows and closes them.... you can't predict what window someone might open despite your best efforts to keep in under control. What kind of script would you write that no matter what would close the ones you don't want, and leave open the one you do?

Link to comment
Share on other sites

This should work... though i'm not thinking very well today so i can't be sure -- test it out.

Allow User Abort[off]

Set Error Capture[on]

Freeze Window

SetVariable[ $n ; 2 ]

SetVariable[ $windows ; Substitute( ¶ & WindowNames & ¶ ; "¶The Window You want kept open here¶" ; ¶ ) ]

Loop

Exit Loop If[ $n > valueCount($windows) ]

Select Window[ Name: GetValue( $windows ; $n ) ; CurrentFile ]

If[ Get(LastError) = 0 ]

Close Window

End If

SetVariable[ $n ; $n + 1 ]

End Loop

Edited by Guest
Link to comment
Share on other sites

  • 2 weeks later...

This topic is 6333 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.