Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
OS X Businesses Operating Systems Programming Apple IT Technology

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."
This discussion has been archived. No new comments can be posted.

AppleScript for System Admins WebCast

Comments Filter:
  • It rocks (Score:1, Interesting)

    by Anonymous Coward
    AppleScript rocks. It's a great way for users (that's users, not geeks) to automate stuff on a Mac. Its biggest power is probably the english-like language.
    Like this iChat AV example:

    tell application "iChat"
    send video invitation to account "John Doe"
    end tell
  • Note that this site only contains connection information for a stream of a live presentation that will be performed on Sep. 24, 2003.

    You can download the webcast software, but will not be able to connect or see anything until 1 PM EDT next wednesday.

  • by Anonymous Coward
    AppleScript is like Perl's forgotten twin brother: Perl is fast to write and impossible to read, and AppleScript is highly readable but impossible to keep "in your head" .. too much like a weird dialect of english.

    That being said it *rocks* for controlling GUI apps .. for instance you can generate diagrams in OmniGraffle diagramming tool entirely through scripts! I was trying to create a script to generate ERD from MySQL schema but gave up after a while because AppleScript is so chewy.
  • by supton ( 90168 ) on Sunday September 21, 2003 @01:01PM (#7018227) Homepage
    I wonder sometimes what Apple doesn't gradually dump AppleScript for Python? Think about it: it would give them a scripting platform as powerful as powerful as Java, but (nearly) as simple as AppleScript (perhaps more readable, and certainly more maintainable). Python 2.3 is going to get bundled with Panther, and is used in some core "essential functionality" in Panther and already has bindings to pretty much everything one would needs to tightly stitch to Apple's platform (ojbc, quartz, Java apps via JPE, etc).
    • by gerardrj ( 207690 ) * on Sunday September 21, 2003 @02:21PM (#7018825) Journal
      Or for that matter, why not Perl. If you co scan CPAN you'll see Perl modules that will connect you in to most of the useful parts of OS X.

      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.
    • I wonder sometimes what Apple doesn't gradually dump AppleScript for Python?

      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?
    • by scrotch ( 605605 ) on Sunday September 21, 2003 @03:25PM (#7019237)
      Serious question:
      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?

      • 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?


        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
      • Now if I can replace
        FileMaker Quark
        with
        MySQL Quark
        that would seriously rock.

        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]

    • I suppose you could write a python action recorder, but it's a lot easier to use a language built around apple's event model for the record feature of applescript. This allowed non-coders to very quickly build a script to do something. And if it needed customization, it was a quick edit to change it. The lanugage is really for quick user actions or inter-application data sharing. For writing real apps, python is a better language, and certainly for sophisticated database interaction.
    • You don't really need to replace AppleScript with python, per se. The ability to call Apple Events is within the ability of many scripting languages on the Mac. You can also call AppleScripts from anything that can run a program via the command line, and you can send out command line tasks through Applescripts. It's a pretty useful technique to mix Applescripts with shell scripts based on their relative strength. And, yes, Applescript has the ability to do things easily in its language that other languages
    • I wonder sometimes what Apple doesn't gradually dump AppleScript for Python?

      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]

What this country needs is a good five dollar plasma weapon.

Working...