PDA

View Full Version : intelligent path line in a script


Dmaxer
09-20-2005, 07:48 PM
I would like to know how I could make this line in my script change if max is installed on a different drive

I need it to read the whole path so if Max is installed on drive D it will read this



shellLaunch "D:/3dsmax7/scripts/Xmax/M.exe" " temp.wav "




or if 3Dmax was installed on my C drive and the max dir is 3Dmax7 not 3Dsmax the line will read this



shellLaunch "C:/3dmax7/scripts/Xmax/M.exe" " temp.wav "


the reason is , my script uses a small Dos program and this will be installed into a folder inside maxes script folder , so my script needs to know where it is on the host computer .
is this possible ? if so can someone show me how to go about it

PEN
09-20-2005, 08:37 PM
I would like to know how I could make this line in my script change if max is installed on a different drive

I need it to read the whole path so if Max is installed on drive D it will read this



shellLaunch "D:/3dsmax7/scripts/Xmax/M.exe" " temp.wav "




or if 3Dmax was installed on my C drive and the max dir is 3Dmax7 not 3Dsmax the line will read this



shellLaunch "C:/3dmax7/scripts/Xmax/M.exe" " temp.wav "


the reason is , my script uses a small Dos program and this will be installed into a folder inside maxes script folder , so my script needs to know where it is on the host computer .
is this possible ? if so can someone show me how to go about it

Look up getDir command.

pathVr=(getDir #scripts)
shellLaunch (pathVr+"/M.exe") " temp.wav"

Off the top of my head and it isnt' tested.

Dmaxer
09-20-2005, 08:47 PM
Thanks paul I was not sure what to look for . Thanks again for the reply

CGTalk Moderation
09-20-2005, 08:47 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.