how to run an applescript with "shell" object?
can anyone tell me how?
thank you so from madrid!!
hello, I try but nothing happenps!,
I just want to display an screen message when I do some tasks with max
something like this:
tell application "MaxMSP"
tell application "AirClick"
simulate virtual key code 17
display message "Button 1"
tell application "TextEdit"
how could I do it?
Try typing ‘man osascript’ in the terminal to see what arguments
hello, this is the simple script I need to run… and it
did you try to paste that line directly in the terminal? Was there any
error message, or any kind of feedback?
you can also write a script to a file, and let osascript use it(also
try with the terminal first, then with max).
I can’t fully test this out since I don’t have the "SEC Helper" app,
but I suspect that the character ` before the word "using" could be a
On Jul 13, 2008, at 2:06 PM, gamuso wrote:
hello, thanks for helping…
try this: save script as "mybestscriptever.scpt" in the same folder
where your patch is saved, and then call it with:
or if you’re using the -e approach, you’re probably entering the world
of symbolic pain. simple example would be message box with the:
osascript -e’tell application "Finder"‘ -e activate -e end tell
> so, HOW HAVE I GOT TO WRITE IT TO MAKE IT WORK ON [SHELL]?
it’s really very very simple: just study carefully the way max handles
symbols, osascript manual, actionscript, shell(s), google for error
messages, search max forum and eventually you’ll figure it out.
well, since I wrote ‘actionscript’ instead of applescript(and because
information about escapes and symbols is dispersed throughout the
docs&forum), I’ll give you a hint:
whole osascript line should be one symbol, meaning you should put all
of it in quotes.
but since there are already quotes in your call ("SEC Helper"), and
they have special meaning in max, you’ll have to escape them with ,
meaning: insert before " to get ", but not before first and last
double quotes(which define max symbol).
I’ve just installed sec helper thing, typed correctly formated
message, and it worked, so you know now it’s possible.
If this is too urgent for you, and you don’t want to know at this
point how symbols in max work, look here what to type into the message
box to make it work:
ey, thanks to you all,
this info is helpfull for me!
my applescript is:
tell application "Live"
tell application "System Events"
key down command
key up command
tell application "Live"
set new_file to "Macintosh HD:Users:andrewrobertson:Work:Live:MyLiveSets:B-Keeper2008:B-KeeperTemplate2.als"
open file new_file
this works fine in script editor
however, when I start trying things like:
osascript -e ‘tell application "live" ‘ -e ‘activate’ -e ‘end tell’ -e ‘tell application "System Events"‘ -e ‘key down command’ -e ‘keystroke /"w/"‘ -e ‘key up command’ -e ‘keystroke /"d/"‘ -e ‘end tell’
with shell, it doesn;t work.
What’s the method with scpt – I haven’t got that working yet, and how do you deal with enter and apostrophes etc..?
Can anyone give a very clear answer for a simple script that will work whilst also using more than one line?
Okay…so within minutes I’m answering my own question (well, with some help from Enrique, talented colleague..) – maybe I should have tried this before ..but this may help others too
[ ] is the message box
into shell runs the script
will open it.
I think I made a slip-up with a dash or something.
Easiest way to check – put it right back at the root and move up from there…
This would seem a much better way to run applescript than the -e ‘ /" etc
Forums > MaxMSP