HEScript allows you to extend the functionality of your PHP application, complementing PHP and JavaScript.
This topic shows you how to quickly add an HEScript function or procedure to your application. For instance, you may have found some code on our forum that you want to use.
Steps to Add Code #
- In ExeOutput for PHP, go to Application Settings => Scripting.
Double-click
UserMainin the list. The script editor will open:
See the full description of the script editor and its features
Paste the entire function you want to use into the editor. For instance, the following HEScript code returns the path to the user’s “My Documents” directory:
function GetDocPath: String; begin Result := GetSpecialFolderPath(16); end;Click Save Script. Your script is ready!
Executing the Script #
JavaScript and PHP can be used to invoke HEScript.
To execute the code shown previously, you would use the following in PHP:
<?php
$path = exo_return_hescriptcom('UserMain.GetDocPath', '');
?>Click the link above for more examples and syntax.