Notifications
Clear all

[Closed] Browse Directory Button

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 ” … “

4 Replies

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 )
	)
)
createDialog test

[/left]

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!

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

All of the function names for getting and returning folder/file names are really wonky:

Getmaxfilesavefilenamefromfileofsavemaxfilename()

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.