messages to itunes from max with applescript and the shell object
Hi everybody,
As it took me a lot of time to find how to send valid messages from
max to itunes via applescript and the shell, i want to share the
result of my work. Unfortunately, i can't send messages to an app
whose name contains more than one word like "DVD Player". I would be
interested if someone can tell me how to do it.
Thanks.
Philippe OLLIVIER.
-------------------------------------
www.philippeollivier.com
www.bugelkoar.com
www.logellou.com
You could rename "DVD player" to "DVD_Player"
Best,
Jakob
On 22-janv.-06, at 12:12, Jakob Riis wrote:
> You could rename "DVD player" to "DVD_Player"
I'm afraid this should be avoided... This solution makes your patch not
portable, and I don't know how OSX will be able to update DVD Player.
I recently didn't understand why, in reaktor's contextual menus, I
couldn't find some items (empty macro for instance) I found on other
machines until I understood it was because I changed Reaktor's folder
name from "Reaktor5" to "Reaktor5.1".
Obvious pathes issues, as you could also encounter with Max, btw.
Using a backslash before the space works.
-> osascript -e 'tell application "DVDPlayer player" to open'
p
This is very interesting. I see that you can open the system preferences this way. Now what i'd like to know is how does one go about finding the right scripts to open (for example) the energy saver panel and set the processor to high performance - that would be quite handy...
best,
john.
As i was searching for info on scripting i found Doug's AppleScripts for iTunes which might be handy for some...
j
Thanks for your work. It seems to work nicely!
Check into system events apple scripting. None of the preference
panes are currently very scriptable, so the system events library
lets you simulate actually clicking on tabs and buttons, entering
text into text fields, etc.
That's probably your best bet.
Honestly, I'd assume there is a way to access this functionality
through the more robust "defaults" tool (the supported way of
affecting preferences via the shell).
man defaults for more info.
_Mark
Quote: Mark Pauley wrote on Sun, 22 January 2006 14:47
----------------------------------------------------
> Honestly, I'd assume there is a way to access this functionality
> through the more robust "defaults" tool (the supported way of
> affecting preferences via the shell).
> man defaults for more info.
thanks for that, pretty cool...
this is a bit of pain (though perfectly logical)
[i]Note: Since applications do access the defaults system while they're run-
ning, you shouldn't modify the defaults of a running application. If you
change a default in a domain that belongs to a running application, the
application won't see the change and might even overwrite the default.[/i]