Navigation: For Developers > Extend Functionality with HEScript > |
|
This tutorial will walk you through the process of extending the functionality of your ebook application using HEScript. Whether you're a seasoned developer or just starting out, this guide will make the process of adding HEScript functions or procedures to your application a breeze.
Suppose you've found some useful HEScript code on our forum that you'd like to incorporate into your application. Here's how you can do it:
Open HTML Executable and navigate to Application Settings => Scripting.
Double-click on `UserMain` in the list to open the script editor.
👉 For a comprehensive overview of the script editor and its features, check out our Script Editor Guide.
Paste the entire function you want to use into the editor. For example, the following HEScript code returns the path to the "My Documents" directory:
function GetDocPath: String;
begin
Result := GetSpecialFolderPath(16);
end;
Click Save Script. Voila! Your script is ready to use!
You can use JavaScript or HTML links to invoke your HEScript functions or procedures.
👉 Visit our JavaScript-HEScript Guide for examples and syntax details.
For more information, explore the following topics:
•Extend Functionality with HEScript
•Run and Call HEScript From JavaScript And HTML
•UserMain Script And Script Templates
•How to prompt end users for their name once and store it?
•How to password protect pages?
•How to call a javascript function from HEScript (toolbar, menubar)?
•How to open subfolders of a given folder or disk?
•How to prompt for a password for closing ebook?
•How to run an executable file or app?
•How to dynamically modify the Table of Contents?
•HTML Executable JavaScript API
•Special Targets for External Links
•Publication Command Line Arguments