AppleScript for System Admins WebCast 23
Justin Elliott writes "Watch Apple Computer's own AppleScript wizard, Sal Soghoian, present 'AppleScript For System Admins' during Mac OS X Labs' September 24 webcast. Learn about essential AppleScript tools and tips under Mac OS X. Discover how AppleScript can be used for administrative tasks, and how to use AppleScript to effectively interact with the Mac OS X file system."
Re:Don' Like AS (Score:3, Insightful)
You have to be careful with shell scripts on the Mac filing system though - you can end up losing the resource forks which breaks some files.
Re:Don' Like AS (Score:1)
Re:Don' Like AS (Score:3, Informative)
Where are the shell scripts?
What did you want to do from the shell? Some programs are designed to be used from a command line in the Unix way, others are happier being controlled via the GUI and OSA [which you can still get to from the shell using open(1) and osascript(1)]. Those commands won't completely eliminate Applescript, but they will let you stick mostly to sh and only bring in OSA where the target program demands it.
It rocks (Score:1, Interesting)
Like this iChat AV example:
tell application "iChat"
send video invitation to account "John Doe"
end tell
Not available until next week (Score:2, Informative)
You can download the webcast software, but will not be able to connect or see anything until 1 PM EDT next wednesday.
Re:watch in dismay... (Score:1)
-shpoffo
AppleScript is hard to write (Score:1, Informative)
That being said it *rocks* for controlling GUI apps
I like AppleScript, but... (Score:4, Interesting)
Re:I like AppleScript, but... (Score:4, Insightful)
It's simple really: Apple prefers to do things in house where they have control. They don't have to fight with anyone or any standards body to revise or extent Applescript.
I can certainly see AppleScript going away in a few more revisions of the OS. With Project Builder so simple to use, Apple may just decide that actual binary programs are so easy to create that AppleScript is just no longer necessary.
Remember... Applescript was developed as a fast and easy way for people to manage small tasks without the drudgery of writing in C. In Project Builder you nary need a line of code, just drag, drop and fill in the blanks, thus eliminating the drugery.
Re:I like AppleScript, but... (Score:2)
Or why not just include both (as they will soon be doing) and give users more options to choose the right tool for the right job?
Re:I like AppleScript, but... (Score:4, Informative)
Can Python (or Perl, or anything else) interact with other running OS X programs?
That's why we've used Applescript with OS 9 so much. We can write scripts that tell Quark XPress what to do. We can pull info from FileMaker and format it and place it in Quark auto-magicly. We've written scripts that manipulate text in Quark text boxes without ever leaving Quark - like they're just another menu item. We can do similar things with Outlook Express and BBEdit and any number of other apps. I've written a bunch of Applescripts, but very few that didn't interact with at least one commercial application.
Now if I can replace
FileMaker <- Applescript -> Quark
with
MySQL <- Python/Perl/etc -> Quark
that would seriously rock. Are you saying I can do that? Can you post a link to some info on getting started?
Re:I like AppleScript, but... (Score:2)
FileMaker <- Applescript -> Quark
with
MySQL <- Python/Perl/etc -> Quark
that would seriously rock. Are you saying I can do that? Can you post a link to some info on getting started?
The stuff in the middle of your diagrams can be any OSA scripting language - it just so happens that AppleScript is the only one with any momentum behind it. Frontier used to be possible. When I get a MacArthur grant, I'll write the perl pieces.
In the meantime, if I had to bet, I'd say Ruby [imasy.or.jp] is t
inter-application and inter-script glue (Score:2)
You can call AppleScript from other scripting languages (Python/Perl/Bash, etc) and call other scripting languages from AppleScript, so you can do each manipulation in whatever language you find most convenient. I usually find it easiest if you keep AppleScript for manipulating objects within your application (Quark) and do the backend data manipulation in Perl etc.
Apple has a page about using 'do shell script' to invoke UNIX [apple.com]
Re:I like AppleScript, but... (Score:1)
Re:I like AppleScript, but... (Score:3, Interesting)
Re:I like AppleScript, but... (Score:1)
Anyone who wants another scripting language instead of AppleScript can do it themselves. AppleScript is not a one man show, it is part of Apple's open scripting architecture.
Anyway, a google search reveals this: Using the Open Scripting Architecture from Python [apple.com]