Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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!

Posted

Why not set up a start up script? You can open only the window(s) and/or tables you wish. You can also have a Close script that will close all files as well as make back ups.

Posted

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?

Posted (edited)

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
  • 2 weeks later...

This topic is 6553 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.