You don't need all of it to do that... Just the closeDoc command.
You mean you want it to remember that the button was clicked for the next open? Very challenging, you’d have to save the file.
You mean like so,
app.alert("you are not allowed to view this doc.", 1, 0);
Saving the doc isn't a concern for me. The doc should just slam shut when the button is clicked after a date. I got a little closer with Try's help. But, after using it and trying it out I became aware that the doc should be usable for a period of time, even if the close button is clicked. But, then if I don't want the user to use the doc anymore, then the close code would be effective and shut the doc.
Sounds a bit confusing I know but even with the original expire I mix it up with other script (like the reset feature) then I obfuscate all the code, then password the doc. Seems to help a little and nothing is perfected, but we must try to protect the code.
Yes, that's it. If you want to make the file usable for a while after the button is clicked and before it is closed you can use the setTimeOut method to delay the execution of the closeDoc command.
I understand the closeDoc, but I don't know how to do this bit. Could you show me how to do it so I can try it out and play around with it? Thanks, Try.
1 person found this helpful
Read the documentation of the setTimeOut method of the app object. It's explained there in detail, including examples.