Hello,
Can you please give an example about how to create Selectdirectory function ?
Thank-you,
Hello,
Can you please give an example about how to create Selectdirectory function ?
Thank-you,
In UserMain script (Script Editor of ExeOutput), add
Function AskFolder: String;
Begin
Result := SelectDirectory("Choose a folder", "");
End;
Then call this AskFolder function avec PHP ou JavaScript… :
<?php
echo exo_return_hescriptcom("UserMain.AskFolder", "Error");
?>
Merci beaucoup !
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 ?
You would have to store the result into a global variable:
Function AskFolder: String;
Begin
Result := SelectDirectory("Choose a folder", "");
SetGlobalVar("mydir", Result, False);
End;
Then, for echoing it,
<?php
echo exo_getglobalvariable('mydir', '');
?>