Menu link to License agreement- SOLVED

dcrwilson

New member
Hello is there any way to link a menu item to the custom userLicenseDialog so that when it is clicked from the menu users can review the license agreement.
 
Last edited:
We suppose you followed the instructions of the readme.txt available at C:\Program Files (x86)\HTML Executable 4\CustomDialogs
Your UserMain script should then have this code:
edit the “UserMain” script.
And add this code:

procedure ShowLicenseAgreement;
begin
// Should we display the license agreement ?
if GetGlobalVar(“licagree”, “0”) <> “1” then
begin
DisplayCustomDialog(“userLicenseDialog”, true);
if GetGlobalVar(“licagree”, “0”) <> “1” then
begin
// User pressed ALT+F4 to close the screen.
ExitPublication;
end;
end;
end;

In the Menu Editor, create the menu item you want and choose “Execute this script function” then type:
UserMain.ShowLicenseAgreement


Pasted image583×602 23.6 KB
 

Attachments

  • blob.png
    blob.png
    23.6 KB · Views: 0
I figured it out…I believe because of the line GetGlobalVar("licagree", "0") <> "1" once the pub was ran for the first time and the user clicks ok to agree it stores the response. Therefore if you linked the menu item to theshowLicenseAgreement; Usermain Script it would not have ran again. What I did is placed this code procedure ShowEULA; begin DisplayCustomDialog("userLicenseDialog", true) ;end; in the User Scripting under Marcos and it worked for me.
 
Last edited:
Back
Top