One of the advantages of OS X’s BSD heritage (via Darwin) is that it has access to all the scripting languages found in UNIX(-like) OSes. Here’s an introduction to open source scripting.
One of the advantages of OS X’s BSD heritage (via Darwin) is that it has access to all the scripting languages found in UNIX(-like) OSes. Here’s an introduction to open source scripting.
What the hell is the difference between “open source scripting” and just regular scripting? Not everything has to be related to F/L/OS-S, people.
Am I going to be forced to GPL and release my script code or something? Haha.
Most of the software that make OSX “special” don’t adhere to the basic tenets of the unix philosophy: simple apps connected by clean text interfaces.
How can you expect to script a bunch of apps that insists on fancy interactive GUI input?
>How can you expect to script a bunch of apps that
>insists on fancy interactive GUI input?
AppleScript can script the GUI if the Application supports it (or at least it used to back in the MacOS 7.5-9.0 days, I haven’t played with OS X much)
My guess would be the ‘osascript’ shell command.
Who are you trying to kid? Applescript is a joke and 99% of Mac apps are simply a slap in the face of unix tradition.
> Most of the software that make OSX “special” don’t adhere to the basic tenets of the unix philosophy: simple apps connected by clean text interfaces.
Different audience. Different goals. Very different roots.
> How can you expect to script a bunch of apps that insists on fancy interactive GUI input?
Not true; a lot of GUI Mac apps also provide IPC interfaces to some or all of their functionality, usually using high-level Apple events which are a significant step-up from stdin. Powerful, if cantankerous, mojo once you figure out how it works (many apps’ IPC interfaces are painfully underdocumented). Even apps that don’t provide IPC interfaces can often be automated by directly manipulating their GUIs via the System Events app. Right ugly, but does the job.
AppleScript (ouch) is the most common choice for this sort of work, but Perl and Python both have well-developed application scripting extensions if you prefer:
Mac::Glue – http://search.cpan.org/~cnandor/Mac-Glue/
appscript – http://freespace.virgin.net/hamish.sanderson/appscript.html
Tcl, Ruby and C are also options if you don’t mind getting down and dirty with the low-level Apple Event Manager APIs.
has
so?
OS X has bought UNIX into the 21st century. So what if it has to compromise some tradition. The very strong fact is that its one of the most user friendly *nix on the planet that any old person can use.
And hey if your an old timer then flip open the terminal and go underground the option is still there.
There is new tool for Apple GUI scripting – REBOL/View, which is now in Alpha stage for OS-X, finally …
-pekr-