Notifications
Clear all

[Closed] Opening a file or WebSite From Max Script

Is there a way to have MaxScript open/launch a file. i.e. like double clicking on a file on you desktop.

I would like to open/launch a Text Doc this way.

Opening a web site like clicking on a link would also do the trick.

I have been playing around with the

getOpenFileName

But this seems to only be a way of bring in information into a max file.

Thanks for any help.

3 Replies
1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

Shelllaunch does the trick – it simulates the double-clicking on a file.
It expects two parameters – if you submit the file name and an empty string, like

shellLaunch “myfile.txt” “”

then the default Windows application will be launched to open the file.

If you supply an application and a file name, it is like dragging the second file over the first, for example

shellLaunch “notepad.exe” “myfile.txt”

will launch Notepad to open the file. Obvioulsy, if the path of the application is not in the Windows paths, you might have to supply an absolute path to the application…

Cheers,
Bobo

Check “Executing External Commands and Programs” in max script reference.

greets

Guys:

Thank you for the help. Shelllaunch did the trick. Sorry for the long reply.