Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FileMaker Topics / December 2003

Tip: Looking for answers? Try searching our database.

My 1st attempt at a 30 day trial expiry script - Additional...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Comfortably Numb - 24 Dec 2003 12:13 GMT
Hmm, just realised if you set the system to (for example) 2005 and
opened it and then reset the system to 2003 (or 2004, depending when
you're reading this!) it will still work.

So... I have updated the script to include a start date - if the
current status date is less than the original start date then it will
also quit.

It uses three global fields - 'Date End', 'Date Start' and 'counter' -
here's the new script...

**********START

Allow User Abort [Off]
Set Error Capture [On]
If ["counter = 2"]
Show message ["Sorry this demo has expired."]
Quit Application
Else
If ["IsEmpty(Date End)"]
Set Field ["Date End","Status (CurrentDate)+30"]
Set Filed ["Date Start", "Status CurrentDate)"]
Set Field ["counter","1"]
Show Message ["This demo will expire in 30 days."]
Exit Script
Else
 If ["(Status (CurrentDate) > Date End) or (Status (CurrentDate) <
Date Start)"]
 Set Field ["counter","2"]
 Show Message ["Sorry this demo has expired."]
 Quit Application
 End If
End If
End If

**********END

Now that each time the file is opened, currentdate is checked against
two fields (the timeout and install dates) - if either validations
fail then the counter is set to 2 which stops people reopening the
file. Hope this makes sense, sorry for any confusion! :D

Regards
CN
Paul Bruneau - 28 Dec 2003 04:26 GMT
> Hmm, just realised if you set the system to (for example) 2005 and
> opened it and then reset the system to 2003 (or 2004, depending when
[quoted text clipped - 13 lines]
> If ["counter = 2"]
>  Show message ["Sorry this demo has expired."]

right here you should set a global field so that if the expiration
date is ever seen by the program, it will remember and disallow future
running no matter what date is seen later.
Comfortably Numb - 29 Dec 2003 23:36 GMT
> > Hmm, just realised if you set the system to (for example) 2005 and
> > opened it and then reset the system to 2003 (or 2004, depending when
[quoted text clipped - 17 lines]
> date is ever seen by the program, it will remember and disallow future
> running no matter what date is seen later.

Hmm, I didnt think I had to do that - once the date is reached the
counter is set to '2' which prevents the file from opening again.

I've had a play around with the script and can't seem to find a way to
bypass it - if i set the mac's clock forward and open it, it inserts the
future date in date started. When you reset the clock and open it, the
script compares the current date to the start date - if it see's the
current date is lower than the start date it will timout, return a
counter value of '2' and prevent further opening of the file.

If I set the mac clock into the past and do the same, it will obviously
see the date is well past the 30 days 'End Date' and timeout - again
returning '2' value in the counter and preventing further use of the
file.

Either way, unless you constantly change the clock back to the start
date every time you open it, there appears no way to get around it! :)

I did find one thing though - it is an idea to build in a fail-safe
should you lock yourself out of the file while testing it (I did just
that!).

Create a global text field called 'username' or whatever you want to
call it. Enter an obscure phrase or memorable numbers etc. Then delete
the field from the layout (but the contents remain, unviewable).

For this example we fill the field 'username' with 'bert'...

Allow User Abort [Off]
Set Error Capture [on]
If ["Status(CurrentUser)"="username"]
Exit Script
***rest of script continues here***

So when you run the script, if you lock (or time) yourself out, go to
Application Prefs in Filemaker and type in your secret username in the
'Custom' field.

Now when you re-open the file, it will see that your current username
matches the 'username' field and exit the script - leaving you free to
access the file!

Seems to work for me, just need to make sure nobody finds out the secret
username!

Numb
Paul Bruneau - 30 Dec 2003 12:51 GMT
> > > Hmm, just realised if you set the system to (for example) 2005 and
> > > opened it and then reset the system to 2003 (or 2004, depending when
[quoted text clipped - 20 lines]
> Hmm, I didnt think I had to do that - once the date is reached the
> counter is set to '2' which prevents the file from opening again.

Sorry, you already have what I suggested. I wasn't reading it right.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.