Is there an object to open files remotely (.jpeg, .mov, .txt, .als, etc...)?

hartman.264's icon

I'm working on a project right now where I would like to open ableton sets (.als files) within my max patch, essentially automating the opening and closing of discrete sets. I know that some other artists I know have opened files remotely, but only by controlling the mouse placement on the screen and then sending a command to double-click the file. Does anyone know of a more elegant solution?

pid's icon

there are a few ways. probably easiest:

message to max:

; max launchbrowser $1

where $1 is a symbol and the complete file path of the target document

...from memory

hartman.264's icon

Thanks pid, I just had to put a file:// in front of the absolute path and it worked beautifully

Luke Hall's icon

Using the [shell] external on OSX would be another way to go about this. It gives you a few extra options like being able to specify which application to open file with if the default one isn't what you want.

decoupigny's icon

hey there,
i came across this thread while i was looking for ways to open and close ableton sets remotely. im a musician and i play a lot of shows and opening and closing ableton sets takes stage-time and actually gets increasingly difficult with sweat dripping on the keyboard and trackpad. so i was hoping to find a patch that would allow to open and close sets remotely, e.g. by pressing a key. it does not seem to exist but reading your thread it sounded like an easy thing to do in max. is that so ? if so can you help me with it ? i dont know much about max but i did work with pd for a little bit until about two years ago. it would be fantastic if you could help me with this.

vichug's icon

try connecting a key object to a mesage box with

"
; max launchbrowser file://$1

where $1 is a symbol and the complete file path of the target document
"

as explained above

decoupigny's icon

sorry for the late reply. thanks for your answer. i find it difficult to understand your reply due to my lack
of experience of reading messages regarding max.
does " stand for the usual patch cable ?
why is there a ; in front of the max launchbrowser file://$1 ?
by putting the $1 do you refer to replacing the $1 with the complete file path ?

i only have runtime installed. is there anyone that does not mind patching this together and email
it to me: alex.decoupigny@gmail.com ? i hope this does not come across as be rude..

Mr_MdR's icon

Hi,
When i try this way to open a external file i get a error or it does nothing.

Max Patch
Copy patch and select New From Clipboard in Max.

This is my patch:

can anybody help me? Thanks!

$Adam's icon

Hi,

you need to use [sprintf] to combine the file URL into a single symbol:

Max Patch
Copy patch and select New From Clipboard in Max.

I couldn't check on Windows, but works fine on my Mac.

Best,
Ádám

Mr_MdR's icon

Hello,

Thanks for you answer!
But i get a error (couldn't find file or unknown error).
So i think the path of the file i enter is wrong.
The complete path is 'D:/Mark/Desktop/music/Guitar.wav' (i'm using windows)
The phat you entered is /Users/sadam/Desktop/185.mp4' but i thing that is for Mac only(?).

(ps. my files are on the 'D' drive but Max is installed on the 'C' drive.)