Selectdirectory

In UserMain script (Script Editor of ExeOutput), add
Code:
Function AskFolder: String;
Begin
Result := SelectDirectory("Choose a folder", "");
End;
Then call this AskFolder function avec PHP ou JavaScript… :
Code:
<?php 

echo exo_return_hescriptcom("UserMain.AskFolder", "Error");
 
?>
 
I have a link setup href=“hescript://UserMain.AskFolder” that opens the Dialog window but can you tell me please how I would go about capturing the folder path that is chosen as a variable and echoing it ?
 
Last edited:
You would have to store the result into a global variable:
Code:
Function AskFolder: String;
Begin
Result := SelectDirectory("Choose a folder", "");
SetGlobalVar("mydir", Result, False);
End;
Then, for echoing it,
Code:
<?php 

echo exo_getglobalvariable('mydir', '');
 
?>
 
Back
Top