PDA

View Full Version : Executing External Program with options??


Dmaxer
05-20-2005, 08:27 PM
I need to run a small dos program using script , I know I can use
The DOSCommand() function and the ShellLaunch() commmand
but Im not sure if I can add extra commands to the exe ,
what I mean is to use the program by hand I need to run it in a dos box and type


" M.exe test.mid test.txt "

running this would make the program "M.exe" read the file "temp.mid" and give me a new file "temp.txt "

Im not sure on how to add "test.mid test.txt" part at the end

I have tried this


DOSCommand "D:\Max7\scripts\midimax\\M.exe temp.mid temp.txt"

this seems to open a dos box but then it closes quite fast but there no file output :(

anyone know how to do this ?? can it be done
Thanks for reading

Dmaxer
05-21-2005, 03:24 AM
ok I got it working using the shell command , I did not try that before because I did not think it would work on a dos program , I was wrong :)
I must say the script works well , its great seeing all the 3D paino keys moving in time to the music , Ive only been on maxscript for a week so not sure if my script is as efficient as it could be but I'm getting there, right now it only takes note and timing info from midi channel 1 of the midi file but I would like to change that so it will read all 16 channels all in all make the script more portable so it would be easy to get it to play a set of drums as well as paino keys .

CGTalk Moderation
05-21-2005, 03:24 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.