January 30, 200718 yr [Post 1 of 2] Hi all I have an application with a main script. A key part of the main script or start up script is a loop that I used just to Display the license agreement if necessary. I don’t expect it to actually loop but I don’t know any other way to do this. Its suppose to set a variable then go into the loop. If the agreement has been read, It will set a variable and exit loop. Well, this part works. But if a variable is set to “No”, it performs a script to display a layout with the license Agreement and below it is a sentence that asks the user: Do you agree? With two buttons “Accept” or “Cancel” If the user press the Yes button, the “Pressing I Accept …..” script is ran which set Variables and fields. If the user presses “Cancel”, a variable is set and I had hope that the User would exit the script and the loop and based on the variable; would exit the application as well. But neither two buttons are working as expected. If I press either button, I can tell that some steps are working but I stay on the license agreement layout. See the 4 Attachments accept_button.pdf Display_agreement.pdf
January 30, 200718 yr Author [Post 2 of 2] Additional attachments for previous post. exit_application.pdf MainScript.pdf
January 30, 200718 yr I still cant seem to open it. Maybe you should try and create it again and possibly change the name.
January 30, 200718 yr Maybe you can try it this way... Do it in this order. 1. Create two scripts for Accept and Cancel Agreement. AcceptAgree Script Set Field [Preference::HaveReadLicenseAgreement; "Yes" ] Commit Record [] Close Window ["Agreement Consent; Current File"] Go to Layout ["Passed"] Halt Script CancelAgree Script Close Window ["Agreement Consent; Current File"] Select Window [Current Window] Exit Application 2. On your License layout attach the script to the two buttons for "Agree" and "Cancel" 3. (Make sure you did step 1 & 2 already) Create the script to check for agreement Agreement Check Script Allow user Abort [Off] Set Error Capture [on] # If [Preference::HaveReadLicenseAgreement = "No" ] Freeze Window New Window [Name: "Agreement Consent"; Height:480; Width:500; Top:10; Left:60] Show/Hide Status Are [Lock; Hide] Go to Layout ["License"] Loop Pause/Resume Script [indefinately] End Loop Else Go to Layout ["Passed"] End If
January 31, 200718 yr Author A big thanks to you for responding in such a fast manner. I will give this a try.
Create an account or sign in to comment