Execute any application in Max/MSP

outoff's icon

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

Rob Ramirez's icon

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.

-rob

outoff's icon

ohhhh !

i'm a WinXP user (

there is some external for windows?

thanx

Emmanuel Jourdan's icon

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.

or

; max launchbrowser file:///Applications/Flash.exe

ej

outoff's icon

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?

f.e's icon
outoff's icon

this just that it is necessary!!!
thank you

outoff's icon

hmm...
I want to execute compiled in exe flash-movie,
but opened only empty flashplayer
(

f.e's icon
outoff's icon
outoff's icon

well that? real?

outoff's icon

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

nesa's icon

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

outoff's icon

у меня проблемма с запуском флэш-анимации из Max/MSP
всё взаимодействие происходит через flashserver, но нужно как-то запускать попорядку сами фильмы

спасибо

outoff's icon

отлично!
всё работает, остаётся вопрос на засыпку - возможно ли теперь закрыть приложение из макс
большое спасибо

////////////////////////////////////////////////////////////

fine!
all work, remains question on backfilling - possible now close exhibit from max

many thanks

nesa's icon

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

nesa's icon
outoff's icon

DOSHack opened *.swf files, but don't close by taskkill
in help file it opens NOTEPAD, and don't close too (

thanks

f.e's icon
outoff's icon

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

nesa's icon

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

f.e's icon
Dalmazzo's icon

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

zangpa's icon

Hi Dalmazzo. If you are in OSX, the Shell-external and open command may be an alternative (like someone mentioned before in this thread).

Jon's icon

Hi,

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...

chapelier fou's icon

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 !

chapelier fou's icon
i.m.klif's icon

you can use dropfile to get the path

chapelier fou's icon

i'm not looking to get the path. i want to open a file targeted by a known path.

chapelier fou's icon

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).

chapelier fou's icon

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.

Florent Ghys's icon

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!

chapelier fou's icon

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.

Setlist loader.zip
application/zip 12.47 KB

Florent Ghys's icon

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...

chapelier fou's icon

I got the error message when the path contains accents, like "é" or "è".
Would it be the case, "Florent" ?

Florent Ghys's icon

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?

chapelier fou's icon

The space could absolutely be the reason.

i.m.klif's icon

i think tosymbol solves this. i cant check right now how exactly i'm doing that.

thanks for sharing this patch

chapelier fou's icon

Are you on Windows ?

Florent Ghys's icon

nope on Mac
the space is actually coming out of the tosymbol

chapelier fou's icon

What if you manually remove the space in the message box (in the example you posted) ?

Florent Ghys's icon

I still get the error 43 when removing the space...

chapelier fou's icon

Did you try opening txt files, wav files, anything else ?

i.m.klif's icon

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

i.m.klif's icon

Put tosymbol before sprintf.
without it you'll get file://David :)

Florent Ghys's icon

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?

chapelier fou's icon

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.

Florent Ghys's icon

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!!

chapelier fou's icon

You're welcome, sorry i can't help more.
Glad you like it !

stray's icon

Try this:
"file:///Volumes/ David Douillet/Max Projects/test.png"

Florent Ghys's icon

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