Re: A.S. in OS X
Re: A.S. in OS X
- Subject: Re: A.S. in OS X
- From: Christopher Nebel <email@hidden>
- Date: Sat, 15 Dec 2001 10:22:03 -0800
On Friday, December 14, 2001, at 02:24 PM, Mr Tea wrote:
This from Harold Bert Martin - dated 14/12/01 09:23 pm:
Does anybody know how to script these in OS X:
Dock
Terminal
& System Preferences?
Er, with Perl, I think, Harold.
Be nice, Mr. Tea. Of course, he's not entirely wrong -- neither the
Dock nor System Preferences is directly scriptable. You can manipulate
them by changing the relevant preference files behind their backs,
though: see Sal's "Dock Sets" scripts
(
http://www.apple.com/applescript/scripts/scripts.00.html) for a
(possibly out-of-date) example of how to do this with the Dock.
As of 10.1, you can script the Terminal application itself -- move
windows around, set their color, etc., and execute a command in a new
window. If what you actually want to do is execute a shell command,
then you should get AppleScript 1.8 (currently available in the new
Developer Tools, or coming soon in a software update) and use its "do
shell script" command. (You could also get one of the three or so
third-party scripting additions that do the same thing.)
--Chris Nebel
AppleScript Engineering