Alright, the docs now work, thanks for that
I got the Run command to work, including the -include-directory switch and -output-directory switch. So I have been able to run the latex command without the use of the cd command, great!
But, it appears the dvipng command does not use these switches. It reports several fatal errors there...
So, I tried to use the & symbol to string the three commands (cd, latex, dvipng) together:
jscript code:
var cmd = "cd " + path + " & " +
"latex file.tex & " +
"dvipng -T tight -x 1200 -z 9 file.dvi";
Debug.Trace("Executing command: \"" + cmd + "\".");
var oShell = new ActiveXObject('WScript.Shell');
oShell.Run(cmd, 0, true);
oShell = null;
Since the debugger tells me the command exactly, I tried it manually, simply pasting it in the cmd window. And it worked perfectly fine. Created the dvi and the png file!
But... The script errors on the Run command. It tells me it's an unknown error, error code -2147024894 (which googling found nothing).
The debugger output is this (dutch I know, but many of you seem to be from belgium
so you might understand):
code:
Executing command: "cd C:\Program Files\Messenger Plus! Live\Scripts\MSNLaTeX & latex file.tex & dvipng -T tight -x 1200 -z 9 file.dvi".
> Fout gedetecteerd in regel 100 van "MSNLaTeX.js": <onbekende fout>.
(Code: -2147024894)
> Fout gedetecteerd in "OnEvent_ChatWndReceiveMessage".
(Code: -2147352567)
The command itself cannot be the problem as it works when I use it manually... What's going on?