PDA

View Full Version : Help needed - source command


ctb
10-06-2006, 12:30 PM
Hi,

I have a problem with source command.
Here is the script & error.

string $modelWinS = `window -title "AAAA" -sizeable 1 -bgc 0 0 0 "Window"`;
columnLayout;
string $dirPath = "W:/3D/test/"; //directory
iconTextButton -image1 ($dirPath+"icon/ON_mouth.bmp") -selectionImage ($dirPath+"icon/OFF_mouth.bmp") -style "iconOnly" -width 400 -height 20 -command "source \"$dirPath+ TERT/PRINT.mel\"; PRINT";
showWindow $modelWinS;

// Error: source "$dirPathS+ TERT/PRINT.mel"; PRINT; //


it works if:
iconTextButton -bgc 0 0 0 -image1 ($dirPath+"icon/ON_mouth.bmp") -selectionImage ($dirPath+"icon/OFF_mouth.bmp") -style "iconOnly" -width 400 -height 20 -command "source \"W:/3D/test/TERT/PRINT.mel\"; PRINT";


Does anyone have any cue if I have to use $dirPath in my source command?

cheers.

cosku
10-06-2006, 09:43 PM
Hi,
I usually do this by defining the command-string earlier:

string $modelWinS = `window -title "AAAA" -sizeable 1 -bgc 0 0 0 "Window"`;
columnLayout;
string $dirPath = "W:/3D/test/"; //directory

string $cmd = "source \"" + $dirPath + "TERT/PRINT.mel\" ; PRINT";

iconTextButton -image1 ($dirPath+"icon/ON_mouth.bmp") -selectionImage ($dirPath+"icon/OFF_mouth.bmp") -style "iconOnly" -width 400 -height 20 -command $cmd;
showWindow $modelWinS;

CGTalk Moderation
10-06-2006, 09:43 PM
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.