% sudo gluemac /Applications/Google\ Earth.app #### my $gEarth = Mac::Glue->new('Google_Earth'); my $reco = $gEarth->getviewinfo; #### { 'azimuth' => '1.19852752792094e-14', 'longitude' => '-96.4999988896226', 'distance' => '25484000', 'latitude' => '40.4999984526947', 'tilt' => '-1.26725225589562e-15' } #### #!/usr/bin/perl use LWP::Simple; use Mac::Glue; print "Downloading Perl Mongers XML file..."; my $data = get( 'http://www.pm.org/groups/perl_mongers.xml' ); $data ? ( print "done\n" ) : ( die "Could not get file!" ); # See Mac::Glue for details on creating the glue, probably: # gluemac /Applications/Google\ Earth.app print "Starting Google Earth..."; my $gEarth = Mac::Glue->new( 'Google_Earth' ); $gEarth ? ( print "done\n" ) : ( die "Could not start Google Earth!" ); while( $data =~ m|(.*?)|gs ) { # I could use an XML parser, but it's too easy to do it myself my( $name, $long, $lat ) = $1 =~ m| (.*?) .*? (.*?) .*? (.*?) |xs; print "Flying to $name\n"; $gEarth->setviewinfo( { 'azimuth' => '0', 'longitude' => $long, 'distance' => '4000', 'latitude' => $lat, 'tilt' => '0' } ); sleep 15; }