16 Jan 2019 06:03:11 UTC
- Distribution: Mac-AppleScript-Glue
- Module version: 0.06
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Testers (2 / 0 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.6.0
- Activity24 month
- Download (21.85KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionSTEVIED Steve Dondley
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.
- new($app_name [, $machine ])
Creates a new application object for the
$machineis 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.)
NOTE: Documentation on remote events is a little vague; it seems that you specify the remote machine as a URL like
<host>is either a hostname or IP address. "EPPC" stands for Event Program to Program Communication, apparently.
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.
- objref($class => $string)
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:
You can also have
objref()make up the object reference for you out of a class and string:
$app->objref(application => 'Finder');
This is simply a shortcut to calling Mac::AppleScript::Glue::Object's
John Labovitz <firstname.lastname@example.org>
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.
Module Install Instructions
To install Mac::AppleScript::Glue, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Mac::AppleScript::Glue
For more information on module installation, please visit the detailed CPAN module installation guide.