Newbies Stussy Posted October 25, 2004 Newbies Share Posted October 25, 2004 Is there a way to script checking if a file is already open, in a startup file? So if a user opens the starter file, it can perform the check, and then bypass normal startup proceedures etc etc. Link to comment Share on other sites More sharing options...
Vaughan Posted October 25, 2004 Share Posted October 25, 2004 The DatabaseNames function returns all the names of opens files, paragraph delimited. To look for a file called "HotStuff.fp5" you'd use the function... PatternCount ( "P" & DatabaseNames & "P", "P" & "HotStuff" & "P" ) > 0 ...where the P in "P" is really the paragraph symbol. Link to comment Share on other sites More sharing options...
Newbies Stussy Posted October 25, 2004 Author Newbies Share Posted October 25, 2004 You are the master!!! Thanks fr your help Vaughan. Link to comment Share on other sites More sharing options...
-Queue- Posted October 25, 2004 Share Posted October 25, 2004 You don't have to separate the pilcrows from the filename, nor is the > 0 portion necessary. If [PatternCount( " Link to comment Share on other sites More sharing options...
Vaughan Posted October 26, 2004 Share Posted October 26, 2004 I was waiting for somebody to suggest those changes ;-) I usually separate the pilcrows (never knew there were called that) only to make the string a bit more readable. It also allows the string constant to be replaced with a field name very easily. But yeah, all good comments. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7121 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 accountSign in
Already have an account? Sign in here.
Sign In Now