Not sure if you were simplifying things for the newsgroup, but you'd
certainly have to put "Date(12;1;2005)" because 12/01/2005 = 0.005985, and
additionally I might recommend
1) putting in a back door of some kind so that if you need to get in there
yourself after a given date (or just testing it out) that you aren't locked
out.
2) Exiting the application is a very bad idea in the case someone is working
with another FileMaker file or two. (Unless you're preparing a runtime I
guess) Better to just close the necessary files.
3) You should tell the user why the file is not opening.
Example:
If [(Get ( CurrentDate ) < Date ( 12; 25; 2005)) and (Get (
ActiveModifierKeys ) <> 4)]
Show Custom Dialog ["Access Prohibited"; "Do not open until Christmas!"]
Exit Application
End If
Allows the test to be bypassed by holding down Control key.
Bill
"JC" <jc (AT) jclewis (DOT) biz> wrote
Quote:
I am trying to write a script where if the system date is a certain
date the program will exit. I've tried:
If
Get(CurrentDate)>12/01/2005
exit application
else
open(file)
I am trying to use this in the opening script.
Thanks
JC |