View Full Version : Browse Directory Button
04-15-2008, 05:03 PM
Im trying to create a button that will pop-up a menu that will allow you to browse directories on your computer. After you select a directory, the path information is saved into a edittext box. Does anyone know the script for a button that browses your directories only? It usually looks like a Three dotted icon like " ... "
04-15-2008, 05:18 PM
This function displays a folder selection browser for the user to select a folder. Returns a string path name for the selected folder or the value undefined if the user presses Cancel in the folder browser.
If the initialDir: keyword argument is specified, the Browse For Folder dialog will be opened at the specified directory. Symbolic pathnames are acceptable as the pathname. Available in 3ds Max 8 and higher.
rollout test "test" (
edittext edt_test ""
button btn_browse "..."
on btn_browse pressed do (
local dir = getSavePath caption:"Test path..."
if (dir != undefined) do ( edt_test.text = dir )
04-15-2008, 05:24 PM
Thanks man, I don't know what keyword you searched to find that in the max script help, but mine didn't find it :( Thanks again!
04-15-2008, 05:28 PM
eh, I don't blame ya... "getSavePath"? really, what if you want a folder (the common nomenclature for directories in Windows) that has files you want to open? Then what's saving got to do with anything?
getFolder() or selectFolder() or browseForFolder() or somesuch would have been a bit more logical. But there you go :)
04-15-2008, 11:57 PM
All of the function names for getting and returning folder/file names are really wonky:
The three options are under "Standard Open and Save File Dialogs" in the maxscript reference. And I have to look them up every single time I use them. haha.
04-15-2008, 11:57 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.