NAME
Mac::OSA::Simple - Simple access to Mac::OSA
SYNOPSIS
#!perl -wl
use Mac::OSA::Simple;
osa_script(<<'EOS', 'LAND');
dialog.getInt ("Duration?",@examples.duration);
dialog.getInt ("Amplitude?",@examples.amplitude);
dialog.getInt ("Frequency?",@examples.frequency);
speaker.sound (examples.duration, examples.amplitude, examples.frequency)
EOS
print frontier('clock.now()');
applescript('beep 3');
DESCRIPTION
Allows simple access to Mac::OSA. Just pass the script to the function for frontier()
or applescript()
. Or, pass the script and the four-character component ID to osa_script()
. Functions return a value if there is one, or 1 if successful and there is no value.
Hm. Should frontier()
and/or osa_script($script, 'LAND')
launch Frontier if it is not running?
EXPORT
Exports functions frontier()
, applescript()
, osa_script()
.
HISTORY
AUTHOR
Chris Nandor <pudge@pobox.com> http://pudge.net/
Copyright (c) 1998 Chris Nandor. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Please see the Perl Artistic License.
SEE ALSO
Mac::OSA, Mac::AppleEvents, Mac::AppleEvents::Simple, macperlcat.
VERSION
Version 0.02 (27 May 1998)