addEntitlement()

eSignal EFS 2

addEntitlement()

Top  Previous  Next

 

addEntitlement( code/url, description [, URL] )

 

Provides script developers with a mechanism to quickly activate or deactivate scriptsfor paying customers. Using this feature, you can encrypt and distribute a single copy of a particular script and only authorized users will be able to run the script.

 

Parameters

 

code/url

code (provided by eSignal) or fully-qualified URL to text file containing valid user names

description

text to display to unentitled user

URL

optional. URL to launch if user clicks on description

 

Usage

 

function preMain() {

 

       setPriceStudy(true);

       setStudyTitle("Example Script");

       setCursorLabelName("EMA", 0);

       setDefaultBarFgColor( Color.blue, 0 );

       setShowTitleParameters( false );

 

       //when this script is loaded, addEntitlement() will be called and the current user's eSignal

       //program username will be checked against a list of authorized user names. If this user is

       //not in that list, script operation will abort and an error message will be displayed

       addEntitlement( "www.myWebSite.com/AuthorizedUsers.txt", "Sorry. Not authorized.", "www.MyWebSite.com" );

 

}