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

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

Recommended Posts

Posted

Hi folks,

 

Am after help compiling a script to limit a demo iPad-based solution to 30days after first open.

 

I have used a date-based script to similar effect, however, am after something more empirical.

 

TIA

Posted

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

Posted

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.

Posted

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

Posted

To be clear, I meant a person could move the file to a computer, open FM, open the Script Debugger, then open the file using the script debugger to cancel the opening script then do whatever they wanted to.

Posted

That's why I prefaced my example script with "At the most basic level" -- you gotta start somewhere.

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