December 3, 201312 yr 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
December 4, 201312 yr 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
December 5, 201312 yr What is to prevent someone's opening the file without running the script? Steven
December 6, 201312 yr 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.
December 6, 201312 yr Rick: Precisely. And also then possibly tamper with the flag field or otherwise disable the script. Steven
December 6, 201312 yr Author 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
December 7, 201312 yr 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.
December 9, 201312 yr That's why I prefaced my example script with "At the most basic level" -- you gotta start somewhere.
Create an account or sign in to comment