shell

Bill Orcutt's shell object: execute shell commands via this excellent Max object

Tool Files

  • shell (fat 32/64-bit)

  • shell (UB 32-bit)

djiamnot's icon

I was curious about this. Does this shell object allow me to interact with the terminal shell (the way pd shell does)?

tim's icon

sadly, "top" doesn't work (anymore?) for the shell-external. Bug? Feature? ;)

Jeremy's icon

Quickly examining the code after an absence of many years and with fresh eyes, it looks to me like this object needs some serious love. I'll try to find some time to do a major rewrite in the coming weeks. 'top' is a special case because it's an interactive command and not a simple "read" operation. But using some of the advanced technologies in the uci chess object, in particular pseudoterminals, it should be possible to support that and more. Let's see how it goes.

th's icon

killall also doesn't work

th's icon

seems that if i open ssh pi@192.168.1.85 "omxplayer /home/pi/Desktop/pd_player/error/error3.mov" for example then any other message wont work while clip is playing.. not only ssh -l pi 192.168.1.85 "killall omxplayer.bin"

do i do something coplitely wrong here?

Jeremy's icon

I'm sure this is the result of the general oldness and semi-awkwardness of some of this code. When I get a chance for a rewrite, I'll post in the forum. Thanks!

th's icon

thanks... but seems that problem is between my ears.. if i open this command in terminal.. even then i cant kill it from the same window..
is there option to open 2 shell objects like 2 different terminal windows?

Jeremy's icon

Well... you could have 2 copies of the shell object. Or... you could put an '&' at the end of your command to put it into the background on launch. Then shell won't block for the next command. In theory, not tested.

th's icon

like in terminal.. there is this ttys002 and ttys001 system..

th's icon

& didn't work in practice.. but i did script where i ssh-d the player, waited a sec and killall ssh.. after that you can stop the movie! works!! keep up good work!

Jeremy's icon
gmazel's icon

Could you pls post a help file for your shell mxo file? Thanks.

Shahab's icon

Hi Jeremy,
Thank you for the fantastic object, it works fine except that I have an issue with pstoedit (http://www.pstoedit.net) the command for running that via Mac terminal is: pstoedit -f hpgl ~/Documents/test.pdf > ~/Documents/output1.hpgl But when I try doing this with shell it outputs an empty .hpgl file, is there anyway I can fix that?

Thank you

lekirst's icon

is the shell object available for windows7?

serge8000's icon

Hello Jeremy,

Sorry for my English

I need to do a command « minimize patch » in Max Msp
I look and I do not find in Max
I think it’s possible to command « minimize patch » with object shell
But I don’t understand script message for shell?

can you help me?
thank’s

Best Regard
Serge from Paris

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

metamax's icon

Serge, this should do it. You may have to adjust your accessibility settings to allow Max to control your system.

All the best to you and everyone in Paris, brother.

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

metamax's icon

Whoops.. the above patch minimizes all open windows. Here is the script to minimize the current active window.

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

serge8000's icon

Thank you MetaMax!
all is OK! It is great!
Thank you for Paris, the life is strong
Brother

Yoann's icon

Hi,
I'm trying to get this command line tool to work inside max:
https://github.com/jdberry/tag
Is it possible ?

Thanks

Julien Vincenot's icon

Hello

Is there any plan to port the shell object for windows users now? I'm developing on Mac, in particular a library using shell to run LISP code with SBCL and displaying the results with the bach library. Since SBCL is available on Windows as well, a bridge would be really welcome... :)

All the best

Julien

Mr Fold's icon

So I have been using a combination of shell object and MacOS Automator to load Max on boot, and to Restart show machine if any components aren't working correctly (monitored in various ways). This was all nice and happy, until the latest iteration now forces us to use a Windows 10 machine!! Any ideas?

Looks like mxj might be a go, but I am not a javascripter, and am under a deadline....

Anyone got this sort of automation (close / max / restart machine on condition) happening with Windows?

Cheers!

~Fold

Roald Baudoux's icon

+1 for a Windows version.

Carlos Guedes's icon

Hi Guys,
Do you know where can I download shell for Mac? I went to maxobjects but both links seem broken. Also there seems to be no link to the object from here as well. Thanks!

hoowdie's icon

Hey, would love to have a link as well! Thanks

ET FY's icon

here
https://drive.google.com/open?id=1YI8EXh-oa31-w6pFVJk6YhiiuxenHK3g

Nathan Sepulveda's icon

Has anyone successfully used the shell object provided by TOILTOUCH? I can't seem to have it send any messages to the terminal.

piedagile's icon

Hello
Does somebody has a copy of the former shell.mxo that works with Max 6? I use an old Macmini with osx Snow Leopard to work within an exhibition, and plan to display HD videos by using Quicktime rather than jit.qt.movie which cannot give a good fluent rendering. Thanks in advance. Charles.

Mr_Ping_Lee's icon

Hi Jeremy, thank you for updating the shell-object. I need to use telnet via max, is there a way to do it with the shell object? I tried to send "telnet 192.168.1.1" to connect with the client , but it didnt worked out.

Felon's icon

Hi guys,

I'm trying to use the [shell] object to send a simple command line to the terminal in order to pass an MQTT signal (Mac user here). I did it through Mosquitto in terminal, and in Node-Red (which can communicate with Max nicely with UDP), works like a charm, but I would like to be able to do it right from the shell object.

The command line is extremely simple, something like this:

mosquitto_p -t topic/exemple -m Hello

This runs perfectly from the terminal, but I can't send it remotely from the shell object, which is weird.
I already used the shell in the past, with success, but here it doesn't work.

Something I'm forgetting ?

Thank you guys,

michelefiori's icon

Hi everyone, is it possible through the shell to shutdown the mac from Max MSP? I tried with the
sudo shutdown -h now
command but it doesn't work, maybe because it normally requires the password?

thank you

pdelges's icon

Did you try the curtains 3rd party (also by Jeremy B.) object?

michelefiori's icon

No, do you have a link?
Thank you

pdelges's icon
michelefiori's icon
Konstantin's icon

Friends, there is an AppleScript

tell application "System Events" set the props to get the properties of the front window of application process "Finder" set theSBounds to {size, position} of props end tell

please help to execute it and get the data using the shell

MMa's icon

@Jeremy I solved the problem, everything works perfectly, you did a really good job!

Published

Creative Commons License