get path to selected file

Hi,
there is the "getSavePath" in Max, that lets you browse to a folder and will return that path, so it can be used to save or open files in that folder. I would like to have the same thing, but not for folders but files. So that a dialog appears and the user can pick e.g. a material library file. The path to that file would than be returned and could be used to open and edit that material library afterwards. The "getOpenFileName" command shows what I want to do, but it only works for saving Max files.

So how can I browse to a file and get that path?

Regards

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

it doesnt save anything it

it doesnt save anything it just gets a filePath and displays the "save" texts instead of "open"

Raphael 'Insanto' Steves
http://Graph.Net84.Net

br0t's picture

True...we are almost chatting

True...we are almost chatting right now lol :D

Never get low & slow & out of ideas

br0t's picture

Aww man :D Yeah I did find

Phew, I don't know what went wrong yesterday, but I even have that command in my post above... getOpenFileName does exactly what I want, I guess I mixed up something. Thanks (I feel dumb now...) :P

Never get low & slow & out of ideas

Graph's picture

getOpenfileName getsaveFIlena

getOpenfileName
getsaveFIlename

arent those functions in the same page of the help?!

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.