Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: perl sending Apple events?

by BigLug (Chaplain)
on Oct 25, 2005 at 23:57 UTC ( [id://502904]=note: print w/replies, xml ) Need Help??


in reply to perl sending Apple events?

Use Mac::Glue .. it creates a perl module that interfaces with apple events for any application you give it.

From the docs:
Raw Mac::AppleEvents method

use Mac::AppleEvents; use Mac::Errors '$MacError'; $evt = AEBuildAppleEvent('aevt', 'odoc', typeApplSignature, 'M +ACS', kAutoGenerateReturnID, kAnyTransactionID, "'----': obj{want:type(prop), from:'null'()," . "form:prop, seld:type(macs)}" ) or die $MacError; $rep = AESend($evt, kAEWaitReply) or die $MacError; AEDisposeDesc($evt); AEDisposeDesc($rep);
Easier Mac::AppleEvents::Simple method
use Mac::AppleEvents::Simple; do_event(qw(aevt odoc MACS), "'----': obj{want:type(prop), from:'null'()," . "form:prop, seld:type(macs)}" );
Cool Mac::Glue method
use Mac::Glue; my $glue = Mac::Glue->new('Finder'); $glue->open( $glue->prop('System Folder') );

UPDATE: Please stop upvoting this node .. it's my highest for quite a while and all I did was cut-and-paste the pod! Quit it! Now!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://502904]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found