PDA

View Full Version : How to open a folder in maxscript


luigi
02-20-2007, 06:38 PM
I was trying to find in the help of maxscipt the way of open a file with windows explorer.
searching for it on the help

i serach in
3ds Max File Loading and Saving

and

External File Methods

but a i got is get files...

is a simple way to open a window true explorer by maxscript.

Sorry for the question but i been seraxching for a while without any good result.

PiXeL_MoNKeY
02-20-2007, 06:49 PM
Check the "Standard Open and Save File Dialogs" Section of the Maxscript Help.The following methods display the standard 3ds Max file open, file save, or folder selection browser dialog:

getOpenFileName [ caption:<title> ] \
[ filename:<seed_filename_string> ] \
[ types:<description1>||||...| ]

getSaveFileName [ caption:<title>] \
[ filename:<seed_filename_string> ] \
[ types:<description1>||||...| ]

Both functions return a fully-specified file path name or undefined if the user cancels out.

When the optional keyword filename: is supplied, the string is used to define the path and file name of the file to be loaded or saved. The dialog automatically navigates to the specified path (if available on the disk/network), displays its content in the browsing area and suggests the file name in the "File name" field. If the path does not exist, the current path is used and only the file name is displayed as requested.
-Eric

jonlauf
02-20-2007, 06:54 PM
This will open an explorer window

doscommand "explorer"

and this opens one directed at my max 9 root directory

doscommand "explorer \"c:\\Program Files\\Autodesk\\3ds Max 9\\\""

edit:Sorry, maybe I misunderstood the post

Bobo
02-20-2007, 07:05 PM
shellLaunch "explorer.exe" "c:\\temp\\somefolder"

will open Windows Explorer at C:\Temp\SomeFolder (if it exists).

PiXeL_MoNKeY
02-20-2007, 07:10 PM
I guess what he needs all depends on what he is trying to do with the dialog.

-Eric

luigi
02-20-2007, 08:18 PM
thanks bobo that what i was looking exactly for.

Pixel_monkey:
i used
getOpenFileName and getSaveFileName in other part of the script for save ini files .

But I just want ti to open a folder where previously i have created skin files and ini files.Sometimes i need to edit the ini files or check if all skin envelopes are been save properly.
It,s easier if I can open the folder automactly instead to have to go out of max and look for the folder.

thanks for al th quick reply , i will keep working.

CGTalk Moderation
02-20-2007, 08:18 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.