Dan Sugalski > Mac-AppleScript > Mac::AppleScript

Download:
Mac-AppleScript-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

Mac::AppleScript - Perl extension to execute applescript commands on OS X

SYNOPSIS ^

  use Mac::AppleScript qw(RunAppleScript);
  RunAppleScript(qq(tell application "Finder"\nactivate\nend tell))
    or die "Didn't work!";

DESCRIPTION ^

Simple interface to the OSA scripting stuff.

Returns undef on error and sets $@ to the error code. Codes are listed in the AppleScript documentation. On successful completion, this returns the output of the AppleScript command. For empty returns, like with the sample script in the SYNOPSIS, AppleScript appears to return the string "{}" ( That's an open and close squiggle bracket, without the quotes)

EXPORT

None by default.

AUTHOR ^

Dan Sugalski, dan@sidhe.org

Chunks of the code came from Apple Tech Notes, though that'll be cleaned out soon.

SEE ALSO ^

perl(1).

syntax highlighting: