  | | | Mel SYSTEM calls | Mel SYSTEM calls 2003-12-03 - By Dobson, Jeff
Back The system command should appear in quotes (") as opposed to ticks "`" in this case. Of course that means you will have to wrestle with escape characters to get the quotes within quotes syntax correct. I find it easiest to first build my command in string and then feed it to the system command. That bails me out of a lot of syntax trial and error.
string $callCmp = "start cmpPackage.exe " + $workSpace + " directory\\fileName.ext"; print ($callCmp + "\n"); //This is a debug line so the script ed will show you exactly what you are feeding to the system command system ($callCmp);
It has been a while since I have done this, though. You might need to include "system" in the string and eval the string instead.
--JeffD
-- --Original Message-- -- From: Brian Bullock [mailto:Brian@(protected)] Sent: Wednesday, December 03, 2003 9:27 AM To: maya@(protected) Subject: Mel SYSTEM calls
I'm trying to write a mel script that will open a cmp file based on the workSpace variable and a set cmp name.
EG:
system ('start cmpPackage.exe " + $workSpace + "directory\\fileName.ext');
I'm trying to run the script off the top of my head and there maybe syntax problems, but hopefully you get the point...
Any ideas?
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-unsubscribe: <http://www.highend3d.com/maya/listserver/> List-subscribe: <http://www.highend3d.com/maya/listserver/> List-archive: <http://www.highend3d.com/maya/archive/>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-unsubscribe: <http://www.highend3d.com/maya/listserver/> List-subscribe: <http://www.highend3d.com/maya/listserver/> List-archive: <http://www.highend3d.com/maya/archive/>
|
|
 |