Unable to programmatically terminate program (ExeOutput v1.7)

So far I have tried using PHP code such as:

<?php **exo_runhescriptcom('ExitPublication')**;

and a macro/script such as:

procedure OnNavigateComplete(URL: String);
begin
ExitPublication;
end;

and a redirect header such as:

<?php header('Location: **HEScript://ExitPublication**');

and a javascript code such as:

<script type=“text/javascript”>
exeoutput.RunHEScriptCom(“hescript://ExitPublication”);
</script>

But so far have not found a working way to terminate the application, and at present with all above options I’m left with the application window still running as if I hadn’t even tried to terminate it with code. Any assistance would be massively appreciated. Thank you.

Has anyone found a way to use code to close the program? The feature is obviously supposed to be supported as its well documented, I’m working under the presumption I’m doing something wrong, some assistance would be appreciated. Thank you.

The problem is that you can’t call ExitPublication directly.
Try this code instead:

exo_runhescriptcom(‘Macros.MacroExit’);

Also check if the Macros script is included, as shown here: