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

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

Recommended Posts

Posted

I am creating a script to Close a file.

I originally set the button to Exit the Application, but found in the instance that a use had more than one file opened, they were all closed.

Is there a way to say :

IF(.fp7 Files Opened =1;Exit Application Else Close Current File Only

?

Posted

How about :


If [ DatabaseNames = Get ( FileName ) ]

Exit Application

Else

Close File [ Current File ]

End If




or:





If [ ValueCount ( DatabaseNames ) > 1 ]

Close File [ Current File ]

Else

Exit Application

End If

This way you can rename your file without breaking the script.

Posted

May I suggest you NOT exit the application. You are assuming that your solution is the only one the user has open.

I find nothing more frustrating than closing a database, only to find it quits FMP and all the other databases I had open.

Posted

The whole principle i want is to Exit the Application, but IF another file on the users PC i opened, then only to Close the current file to not cause that frustration.

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