File Properties - Associated Script

You are editing the scripting properties of a file that is compiled in a publication with HTML Executable.

About scripting in HTML Executable

The publication or ebook can be extended via scripting functionality. HTML Executable has its own script language called “HEScript“: you can write your own scripts in order to control the behavior of your ebook and actually do what you want.

Several reasons why you can use scripting:

  • HTML Viewer publications do not support JavaScript, but they have extended support for HEScript.

  • IE publications also provide some additional JavaScript options, so you can combine HEScript-JavaScript functionality.

  • Publications feature several built-in HEScript functions to control their behavior and manage user interactions.

Some scripts contain several functions that actually play the role of “events“: when an event is triggered, the publication will execute the associated function.

Script for HTML pages contains events as:

  • when the page has been loaded.

  • when a URL is clicked.

  • when a form is submitted.

  • when the publication is going to quit the page for another one

  • etc.

You can therefore associate a script to an HTML page: when this HTML page is viewed, the associated script is loaded by the publication. Then when an event occurs, the related function is executed. Thus, you may respond to a specific event with your own actions.

In HTML Executable, scripts are compiled during the compilation into p-code for faster execution at runtime (contrary to JavaScript). That’s why scripts are separated from HTML pages and stored in a script manager. You can manage scripts using the User Scripting page in the Application Behavior tab.

Associate HEScript scripts to HTML pages

In the Associated Script tab of the File Properties window, you can choose which script should be associated to the selected HTML page(s). All existing scripts are available in the list: just select the one you wish.

  • You can create a new script by clicking “Create an associated script”. You will be prompted to give a name to your script, then the script editor will be displayed.

  • You can edit the selected script by clicking “Edit this script”. If no script is selected (“None”), nothing will happen.

To manage HEScript scripts, please go to the Application Behavior tab => User Scripts page.

More information about HEScript in HTML Executable.


Copyright G.D.G. Software 2018. All rights reserved