Jump to content
Server Maintenance This Week. ×

Script for a 30day trial from first open


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

Recommended Posts

At the most basic level:

 

1. Create a single-record preferences table, with a "firstOpen" date

2. Each time the file is opened run a script:

Go to layout( prefs )

If( IsEmpty( firstOpen ))

.. Set Field( firstOpen ; Get(CurrentDate) )

Else If( Get(CurrentDate) > ( firstOpen + 30 ) )

.. Show custom dialog

.. Close file

End If

Link to comment
Share on other sites

On an iPad running FM Go how would it be possible to open a file without the script running? Although I suppose a person could perhaps move it to a computer running FM and start up the file without running the opening script.

Link to comment
Share on other sites

Thankyou Fitch - just what I was after, just didn't know how to compile it.

At the most basic level:

 

1. Create a single-record preferences table, with a "firstOpen" date

2. Each time the file is opened run a script:

Go to layout( prefs )

If( IsEmpty( firstOpen ))

.. Set Field( firstOpen ; Get(CurrentDate) )

Else If( Get(CurrentDate) > ( firstOpen + 30 ) )

.. Show custom dialog

.. Close file

End If

 

Rick, I had thought of this too…but inexperience as far as security concepts, means I have yet to uncover a workaround for this….

On an iPad running FM Go how would it be possible to open a file without the script running? Although I suppose a person could perhaps move it to a computer running FM and start up the file without running the opening script.

 

Steven, I thought you might chime in - thank you, ……I'm open to suggestions.

 

When the file is distributed, I don't allow them full admin access, they have only limited access - I'm just not sure that if using this method generates enough security to avoid 'some' of these sorts of possibilities. Although, the impression I get is that using any form of scripting to restrict access is principally flawed because of the ability to pause the script/access it though a debugger>

 

Rick:

 

Precisely.  And also then possibly tamper with the flag field or otherwise disable the script.

 

Steven

Link to comment
Share on other sites

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