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

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

Recommended Posts

Posted

Hi folks,

 

I'm about to issue a time-limited script for a runtime demo.

 

I need help compiling the script which will be along the lines of;

 

At startup, check if the current date is less than August 30, 2013,

 

if it is, then open the "Home" layout, 

 

else a custom dialogue "Demo period has expired"

 

and the runtime closes.

 

I should add that there is already an "OnLayoutEnter" short script, (I'm assuming this is what the script would be attached to, as it's the start layout). The script reads simply "Set Field [Client Search Global::gSearch; "Enter Search Text"]. I would assume the time-limiting script  lines would be entered above this statement in the same script. Or is there another place I locate this script?

 

I'm not well rehearsed with "If" scripts yet (not a lot of need for them in this, my first, solution).

 

Thanks in advance.

 

 

Posted

The script should be triggered by OnFirstWindowOpen (in File->File Options...->Script Triggers)

 

If[Get(CurrentDate) < Date(8; 30; 2013)]

Go to Layout["Home"]

Set Field [Client Search Global::gSearch; "Enter Search Text"]

Else

Show Custom Dialog["Demo period has expired"]

Exit Application

End If

Posted

That's great. Thankyou.

 

Just needed to get the expressions correct.

 

 

The script should be triggered by OnFirstWindowOpen (in File->File Options...->Script Triggers)

 

If[Get(CurrentDate) < Date(8; 30; 2013)]

Go to Layout["Home"]

Set Field [Client Search Global::gSearch; "Enter Search Text"]

Else

Show Custom Dialog["Demo period has expired"]

Exit Application

End If

Posted

Except of course that this process can be easily defeated by any number of mechanisms, including the rather obvious one of tinkering with the computer's clock. Or by interrupting the script.

 

Steven

  • Like 1
Posted

Except of course that this process can be easily defeated by any number of mechanisms, including the rather obvious one of tinkering with the computer's clock. Or by interrupting the script.

Steven

Thanks Steven,

Yes I had thought of that. Fortunately the individuals it will be going to (whom I know personally) aren't that computer savvy to know a workaround like that (trust me, they really aren't!), and I'm still learning about FileMaker security.

Speaking of which, is your book on the topic still available, and relevant to v12? (I noticed its unavailable on Amazon).

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