How do you open an application using [shell] in Windows 10?

ygreq's icon

Hi there!

Any idea on how to open a file using [shell] in Window 10?
I tried sending a simple command of the path of the file and the exe. In cmd it works, but not via shell in max.

Thank you so much!

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

Source Audio's icon

you broke the path because there is a space in there which sprintf removes
without symout set.
And does cmd not need start to run exe file ? I can't remember really,
on Mac one uses open , like open /Applications/TextEdit.app
that would be for your example
start "C:/Program Files (x86)/Termite/Termite.exe"

ygreq's icon

symout works. No need for [prepend start]

Thank you so much!!

PS: Wasn't %s%s suppose to delete the space ?

Source Audio's icon

%s%s is not deleting space, it adds 2 symbols into list
without adding space in between, but only between 2 incoming symbols.
the problem are this spaces :
C:/Program space Files space (x386)
did you look at difference between blue and green message ?
Why use sprintf at all if full path to that exe is known ?

Roman Thilenius's icon


or in other words, it will only "delete the space" (of a symbol) when you send the symbol as list to it.

"hello world"
[fromsymbol]
[sprintf %s%s]

ygreq's icon

I understand now.

Thank you both!

<< Why use sprintf at all if full path to that exe is known ? >> I will need to modify the second part of the message. It is related to the other app I mentioned in the other post where you helped me :). Termite.exe was used in this case for simplicity.

ygreq's icon

I have another question, Source Audio. You say you are using MacOS. How do you start a program in MacOS? It seems it is different there. And how would you run something that in Terminal would look like this?

cd /Applications/uv-qt.app/Contents/MacOS
./uv -t help


Thank you so much!

Source Audio's icon

that specific line is not correct - maybe because of line break in the forum post.
But if the path to executable uv is
/Applications/uv-qt.app/Contents/MacOS/uv
it would look like this
/Applications/uv-qt.app/Contents/MacOS/uv -t help
(in case -t help is valid message to it )
You first enter the path, then what to execute

I don't understand ./uv part of the path.
if that is invisible folder named .uv nested in MacOS, and help is binary executable
then
/Applications/uv-qt.app/Contents/MacOS/.uv/help

you dont need cd and -t
-----
To start application uv-qt.app
open /Applications/uv-qt.app

ygreq's icon

Thank you, Source Audio! It's this application: http://www.ultragrid.cz/installation-and-running/ Normally it is run via an app GUI, but mostly via the terminal. And I would like to control it via Max.

I believe it is a hidden folder (or file ?!) nested inside of the MacOS application. So on MacOS in the Terminal, I type cd /Applications/uv-qt.app/Contents/MacOS and then I type ./uv --help or any other command

I will try to see if your suggestions help.

Source Audio's icon

I'm not at home and only have older MacBook with me running OSX 10.6.8
so I can't run that app, but I can open it's contents.
There is no nested folder or similar, all executable binaries are in the MacOS folder.

so you can defnitely use abslute path to the uv and execute the command.
No need for cd.
/Applications/uv-qt.app/Contents/MacOS/uv -t help

As stated here :
https://github.com/CESNET/UltraGrid/wiki/Running-UltraGrid

It is allways best to use absolute path with shell object, and use slash based path.
./ is sort of relative path , once one lands into directory using cd.

ygreq's icon

Good to know!
But how do you open an app in MacOS using [shell]?
I tried sending the following message to [shell] without any luck:

/Applications/VLC.app

Should I append another message?

Source Audio's icon

you probably missed it in my previous reply.
open /Applications/VLC.app

That's because app bundle in MacOS is a folder.

ygreq's icon

Sorry about that. Now I saw where you wrote about it.
Everything works alright!

Thank you so much for taking your time!