Mac::AppleScript::Glue::Application - an application to send AppleScript to
use Mac::AppleScript::Glue; use Mac::AppleScript::Glue::Application; my $finder = new Mac::AppleScript::Glue::Application('Finder'); my $version = $finder->version;
Objects of this module are used to send events to an application.
See Mac::AppleScript::Glue for full information on how to use this package.
Creates a new application object for the $app_name application.
$app_name
If $machine is specified, the specified computer will be sent events instead of the local machine. This uses Apple Remote Events, which you'll have to have enabled on the remote machine before events can be sent to it. (Look in the Sharing system preference or control panel on the remote machine.)
$machine
NOTE: Documentation on remote events is a little vague; it seems that you specify the remote machine as a URL like eppc://<host>, where <host> is either a hostname or IP address. "EPPC" stands for Event Program to Program Communication, apparently.
eppc://<host>
<host>
Returns the name of the application connected to this object.
Returns the AppleScript object reference for this application.
Sends a user-specified AppleScript to this application. The script can be a simple one-liner or a multi-line script; in either case, script lines should not contain newlines. If the script returns a value, it will be parsed into Perl data structures.
Creates an object reference to use as a standalone object. If you have a complete object reference (like application "Finder"), you can pass that as a single argument:
application "Finder"
$app->objref('application "Finder"');
You can also have objref() make up the object reference for you out of a class and string:
objref()
$app->objref(application => 'Finder');
This is simply a shortcut to calling Mac::AppleScript::Glue::Object's new method.
new
Mac::AppleScript::Glue
Mac::AppleScript::Glue::Application
John Labovitz <johnl@johnlabovitz.com>
Copyright (c) 2002 John Labovitz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mac::AppleScript::Glue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::AppleScript::Glue
CPAN shell
perl -MCPAN -e shell install Mac::AppleScript::Glue
For more information on module installation, please visit the detailed CPAN module installation guide.