Im trying to set a script to open a file with the default application of windows. I have some Powerpoint files that i need to open with the microsoft app and im using this:
procedure OpenAFile(FilePath: String);
var
res: integer;
begin
res := OpenFile(FilePath, “”, SW_SHOWNORMAL);
if res < 32 then
begin
MessageBox("Error al abrir el archivo: " + FilePath + ". Código de error: " + inttostr(res), “Launch Error”, MB_OK + MB_ICONERROR);
exit;
end;
end;
And in Javascript this:
const openExternalFile = (relativePath) => {
// Call the original HEScript function without any modification
exeoutput.RunHEScriptCode(`OpenAFile("${relativePath}");`);
}
but i get the error: "Unknown method or routine: ‘OpenAFile’. Im using exeoutput 2021.
What Am i doing wrong? Thanks
1 post - 1 participant