ExportAFile usage example

Dear Sirs,

Please provide with a HEScript code example on how to use ExportAFile command and how to get path of file to be exported using this command.

Kind Regards,

Kandarp Mistry.

For example, suppose you have a compiled file whose virtual path is “Demo1.pdf”.

Add the following HEScript code to the “UserMain” script:

function ExportMyFile(Path: String): String;
begin
Result := ExportAFile(Path, "Save File As", "*.*");
end;

Then you can call this HEScript function from PHP thanks to:

<?php   

echo "Asking for filename...<br>";  

// Executes HEScript to export the file Demo1.pdf from compiled resources
$filename = exo_return_hescriptcom("UserMain.ExportMyFile|Demo1.pdf", "Error");  

// The $filename variable contains the full path to the file selected by the user. It can be passed to fopen for instance.  

echo "File path: $filename";  

?>

hi there
I wonder how I can make custom file type instead of point.
Regards,
khalid

What do you mean?