November 8, 201015 yr 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 ?
November 8, 201015 yr Author This SEEMS to work: IF(DatabaseName<>"DB01";Close File); Else Exit Application End IF
November 8, 201015 yr 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.
November 8, 201015 yr Author Perfect. Thanks... I will use the first script based on the file name opened.
November 8, 201015 yr 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.
November 8, 201015 yr Author 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.
Create an account or sign in to comment