ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Apache and AppleScript
Subject:   Glaring Error
Date:   2005-02-12 01:24:47
From:   has01
"""AppleScript is a language used to accomplish what traditional scripting languages are unable to do: exchange information between applications on a higher level than is possible through plain-text pipes on the command line;"""


Not so. There are plenty of traditional scripting languages with varying levels of Apple event support. Offhand, here's the ones I can think of:


- Perl has long had well developed application scripting support in the shape of Mac::Glue (download) (perl.com article).


- Python also has very good application scripting support that easily gives AppleScript a run for its money; see appscript (note: self-link).


- Late Night Software do a JavaScript OSA component.


- Tcl and Ruby both have basic Apple event support.


- And UserTalk is the granddaddy of them all - AppleScript included - being the first ever scripting language ever to support OSA (ch. 32 of Matt Neuburg's Frontier book).


For example, here's how to get a Finder comment using MacPython+appscript:


#!/usr/bin/pythonw


from appscript import *


path = '/Users/NAME/your/path/here'
comment = app('Finder').items[path.replace('/', ':')].comment.get()


HTH


has


p.s. Your apachecomments.zip file is broken. Old-style applets store their script in the resource fork, so you'll need to use a compression format that preserves this.


1 to 1 of 1
  1. David Miller photo Re: Glaring Error
    2005-02-12 13:04:30  David Miller | O'Reilly Blogger [View]

    • Re: Glaring Error
      2005-02-12 15:14:09  has01 [View]

1 to 1 of 1