shell("dm -o testsubject.dme > output.txt")
So I can create an XML table of a dynamically loaded BYOND environment..
I can't get it to output what I need, is it even possible to parse the return value into text file for this executable?
ID:991372
Sep 26 2012, 8:44 pm
|
|
I'm trying to accomplish something like; psuedo-code:
shell("dm -o testsubject.dme > output.txt")
So I can create an XML table of a dynamically loaded BYOND environment.. I can't get it to output what I need, is it even possible to parse the return value into text file for this executable? |
DM.exe requires byondcore.dll so I cant relocate the file into my project. Calling dm is calling the executable located in my bin, as I can call DreamMaker and etc with no problems.
I opened the command window:
shell("cmd /K")
and dragged the corresponding files into the command prompt along with the arguments, I seemed to be successful in parsing output into the text file, but only if I do it manually. However, no matter what I try in dream maker, I can't get it to simulate the same effect... |
Like I said make sure the world is being hosted in Trusted mode, and see if that'll work.
Safe mode will only work in the directory where the .dmb file is. With your first post you are calling dm but the shell doesn't know where it's located so you will have to have the C:/Program Files location in that snippet of code. |
But a great way to test this before hand is cmd (command prompt)
cd to the BYOND directory (or where dm.exe is) and run it.
You'll find that
Will become
shell("C:/Program Files/BYOND/bin/dm.exe -o testsubject.dme > output.txt")
And the project being hosted will have to be in another mode (ie not safe mode)