Execute any application in Max/MSP

    Jul 09 2007 | 5:00 pm
    Hello to all members!
    Sorry for my bad English (
    I need to execute any application from max (like Flash, but I think algorithm to all files alike)
    possible this?
    many thanks!!!
    sergey komarov russia SPb

    • Jul 09 2007 | 5:06 pm
      if you are on os x, use the shell external: "open -a /path/to/application"
      or "osascript tell "application" open" (not sure about the applescript syntax)
      or use tap.applescript.
    • Jul 09 2007 | 5:15 pm
      ohhhh !
      i'm a WinXP user (
      there is some external for windows?
    • Jul 09 2007 | 5:16 pm
      On 9 juil. 07, at 19:06, Robert Ramirez wrote:
      > if you are on os x, use the shell external: > "open -a /path/to/application" > > or "osascript tell "application" open" (not sure about the > applescript syntax) > > or use tap.applescript.
      ; max launchbrowser file:///Applications/Flash.exe
    • Jul 09 2007 | 7:11 pm
      Quote: Emmanuel Jourdan wrote on Mon, 09 July 2007 11:16 ---------------------------------------------------- > ; max launchbrowser file:///Applications/Flash.exe > > ej ----------------------------------------------------
      like: ; max launchbrowser file:///C:/playlist.exe ?
      indeed he nothing do not execute, but also not give error
      (((( that I do not so?
    • Jul 10 2007 | 10:55 am
    • Jul 10 2007 | 11:20 am
      this just that it is necessary!!! thank you
    • Jul 10 2007 | 12:21 pm
      hmm... I want to execute compiled in exe flash-movie, but opened only empty flashplayer (
    • Jul 10 2007 | 12:34 pm
    • Jul 10 2007 | 12:46 pm
    • Jul 11 2007 | 2:34 pm
      well that? real?
    • Jul 20 2007 | 8:18 am
      hitherto can not copes with problem necessary that max/msp should start by turns flash-movies, but I even one can not start ( please help! i'm works on WindowsXP/Vista
      sergey komarov SPb russia
    • Jul 20 2007 | 9:01 am
      Could you please write your posts in both russian and english, I might have better luck understanding them...
      On Jul 20, 2007, at 10:18 AM, outoff wrote:
      > > hitherto can not copes with problem > necessary that max/msp should start by turns flash-movies, but I > even one can not start > ( > please help! > i'm works on WindowsXP/Vista > > sergey komarov > SPb > russia
    • Jul 20 2007 | 9:12 am
      у меня проблемма с запуском флэш-анимации из Max/MSP всё взаимодействие происходит через flashserver, но нужно как-то запускать попорядку сами фильмы
    • Jul 20 2007 | 10:05 am
      отлично! всё работает, остаётся вопрос на засыпку - возможно ли теперь закрыть приложение из макс большое спасибо
      fine! all work, remains question on backfilling - possible now close exhibit from max
      many thanks
    • Jul 20 2007 | 11:01 am
      Good! As for closing flash player from max, it won't be too easy as far as I know.
      If you know the exact file name of the executable you want to close, you could use taskkill command line util(f.e. taskkill /F /IM yourflashplayer.exe). Type taskkill /? in xp command prompt to see it's parameters.
      best wishes, nesa
    • Jul 20 2007 | 11:17 am
    • Jul 20 2007 | 11:36 am
      DOSHack opened *.swf files, but don't close by taskkill in help file it opens NOTEPAD, and don't close too (
    • Jul 20 2007 | 11:55 am
    • Jul 20 2007 | 1:23 pm
      in windows Vista it worked ! open -------------------> closed beautifully!!! but it's take over 60-100 ms hope is gonna be all right
      many thanks
      ps heard that in Vista problem with Java, hope earn )))
    • Jul 20 2007 | 2:02 pm
      damn microsoft...
      there must be some free alternative, maybe:
      On Jul 20, 2007, at 1:55 PM, f.e wrote:
      > hop hop hop ! Yes it closes things using taskkill, but i taskkill > is only available on Win XP PRO... > > And sure it launches .bat
    • Jul 20 2007 | 2:17 pm
    • Sep 12 2016 | 3:14 pm
      Hi I have a problem with ";max launchbrowser" I can run an app made in openframeworks, but it runs as a background process and it crash when I start to send messages to it. If I open by hand as a front app the app goes just well and clean. Thanks for the help
    • Sep 12 2016 | 5:32 pm
      Hi Dalmazzo. If you are in OSX, the Shell-external and open command may be an alternative (like someone mentioned before in this thread).
    • Nov 15 2016 | 10:25 am
      I am trying to launch a java application using the shell object. I can open applications and files using the 'open' command, and other basic commands like cd, mkdir and ls seem to work.
      To run the java app (which is already compiled) directly form the terminal I usually call:
      java filename
      Can this be done via shell?
      Thanks Muchley...
    • Sep 19 2017 | 9:43 am
      Can someone point me the syntax to open a specific file with ;max launchbrowser ? For instance : "Macintosh HD:/Users/louiswarynski/Documents/SETS Live/Live 2017/Philémon Project/Philémon 0.088.als"
      Thanks a lot !
    • Sep 20 2017 | 2:29 pm
      Anyone ?
    • Sep 20 2017 | 5:20 pm
      you can use dropfile to get the path
    • Sep 20 2017 | 5:24 pm
      i'm not looking to get the path. i want to open a file targeted by a known path.
    • Sep 21 2017 | 4:40 am
      Hi, this is an old thread, and I could be wrong, but the solutions mentioned earlier were only to be found long ago using 3rd party externals. One was 'shell' used to be here: http://www.maxobjects.com/?v=objects&id_objet=1194 but perhaps was eventually substituted by 'aka.shell', found on the same maxobjects site, or here: http://www.iamas.ac.jp/~aka/max/
      The other was a tap-tools object, 'tap.applescript', found here: http://www.maxobjects.com/?v=libraries&id_library=2
      I'm not sure if those objects work for current versions of Max(you could try), but currently, there might not be a clear answer to your problem: times have changed, and they probably require a new set of experimentation/development/tools/expertise.
      As for the earlier post about ";max launchbrowser" working with 'OpenFrameworks'(but not very well), i doubt that was anything intentionally designed to work with Max, nor its 'launchbrowser' command, by Cycling74(the user, "Dalmazzo" sounds like he tried experimenting with it, but never made it work in a fully functional way, and only got it to launch, probably by accidental luck).
      You can see here all the messages which can be sent to max directly: https://docs.cycling74.com/max7/vignettes/messages_to_max (and 'launchbrowser', described there, is for opening your system's default browser to a specific URL only ...not designed for opening local files or apps)
      There you will also notice that there are other messages which sound like they could work in opening files and apps, but instead are designed specifically for max-related files only(for delineating paths to the Max application itself, for opening patcher files, or for linking external names to their corresponding files, etc.)... and if you think about it, this is actually a good thing: if there were an easy way to open up any kind of file or app using Max, it could be disastrous to the overall Max ecosystem as anyone would be able to use the pretense of sharing Max patches to infect systems with viruses or malware.
      I could be wrong, though :) Either way, hope it helps clarify some things about this thread. à votre santé
    • Sep 21 2017 | 6:40 am
      Many thanks, Raja, typing on a phone right now as I am on the road. I need to do more testing but I managed to launch ableton live with the ;max launchbrowser message, with the help of some code posted above. But still no luck with targeting a .als file. I believe it could be just a matter of syntax to target a file somewhere in my HD (example path given above).
    • Sep 21 2017 | 7:20 am
      Yeepee I found the correct syntax : ; max launchbrowser "file:///Users/yourname/path and extension of the file" the "" are important if the path contains spaces.
    • Sep 22 2017 | 3:55 am
      I am using the shell object on a regular basis and it works great and yes the " " are important if your path contains a space!
    • Sep 22 2017 | 5:04 pm
      Yeepee I found the correct syntax :...
      Oh nice! Glad you figured it out. And thanks for sharing the answer with us. Good to know :)
    • Sep 25 2017 | 8:21 am
      In case anybody is interested, here is the patch i came up with. You can drop up to 20 files, and load them sequentially via MIDI note or CC. You can save setlists as txt files, and drop setlists to load them. You can save the MIDI "next" assignment within the patcher (this will save the MIDI device as well). I use it to remotely load Ableton Livesets, but it should work with any files.
    • Sep 26 2017 | 10:19 pm
      thanks for sharing! I get a "Max could not launch URL. err = -43" message though. I've tried with als and maxpat files. not sure what's wrong...
    • Sep 27 2017 | 6:16 am
      I got the error message when the path contains accents, like "é" or "è". Would it be the case, "Florent" ?
    • Sep 27 2017 | 1:47 pm
      haha! no accents though. It does the error 43 with a file like "file:// David Douillet:/Ableton Live Projects/Acoustic/Ambigu Project/Cool.als" There is a space before my hard drive's name. Could this be the issue?
    • Sep 27 2017 | 2:16 pm
      The space could absolutely be the reason.
    • Sep 27 2017 | 2:21 pm
      i think tosymbol solves this. i cant check right now how exactly i'm doing that.
      thanks for sharing this patch
    • Sep 27 2017 | 2:22 pm
      Are you on Windows ?
    • Sep 27 2017 | 2:25 pm
      nope on Mac the space is actually coming out of the tosymbol
    • Sep 27 2017 | 2:29 pm
      What if you manually remove the space in the message box (in the example you posted) ?
    • Sep 27 2017 | 2:35 pm
      I still get the error 43 when removing the space...
    • Sep 27 2017 | 2:38 pm
      Did you try opening txt files, wav files, anything else ?
    • Sep 27 2017 | 2:44 pm
      it might be prepend. you are actually adding a space between the slash and David. You should use sprintf. sprintf file://%s should solve this
    • Sep 27 2017 | 2:49 pm
      Put tosymbol before sprintf. without it you'll get file://David :)
    • Sep 27 2017 | 7:02 pm
      (if the above doesn't do it, i bet it's getting confused by the extra colon after your name -> "David Douillet:" <- try removing that last colon )
    • Sep 27 2017 | 7:35 pm
      it's weird because something like "file:// Jean-Brigitte:/Users/FLO/Desktop/test.png" works fine (with the extra space after file:// and the extra colon) but something like "file:// David Douillet:/Max Projects/test.png" doesn't work. Removing the extra space and extra colon doesn't make a difference.
      Maybe the command [; max launchbrowser] only works on the same drive as the one Max is installed on? Are you guys able to load files that are not located on the same drive as Max? Or like external drives?
    • Sep 28 2017 | 7:49 am
      I just tried loading a file from a USB stick. Couldn't open any, and got errors -43 as well. Same files on my desktop open just fine.
    • Sep 28 2017 | 1:51 pm
      well, it seems that the "launchbrowser" message to Max only works on the drive that has Max on it. At least that's the way it seems to behave on my computer.
      the only info I could find says: "The word launchbrowser, followed by a URL as a symbol, opens a web browser to view the URL. For example: ; max launchbrowser http://www.cycling74.com"
      thanks for sharing your patch though, it's super useful!!
    • Sep 28 2017 | 2:13 pm
      You're welcome, sorry i can't help more. Glad you like it !
    • Sep 29 2017 | 4:55 pm
      Try this: "file:///Volumes/ David Douillet/Max Projects/test.png"
    • Oct 03 2017 | 7:47 pm
      thanks STRAY but I still get the error 43 not a big deal though, I can just put the files on the other drive when I need to start them with Max