in reply to iTunes lacking on CPAN...

You should be able to do this pretty easily with Mac::AppleScript::Glue.

#!/usr/bin/perl -w # This code not tested, as I sadly don't have a Mac at work use strict; use warnings; use Mac::AppleScript::Glue; use Data::Dumper; my $t = Mac::AppleScript::Glue::Application->new('iTunes'); my $track = $t->current_track; # Not sure if current_track is going to return a hash # or an object... print Dumper( $track );

If that doesn't work, I'll update it when I get home tonight and have access to a Mac again...


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re^2: iTunes lacking on CPAN...
by stonecolddevin (Parson) on Nov 13, 2006 at 16:27 UTC

    I was under the impression that all Mac:: modules required a Apple computer to work? Maybe I misread...

    meh.

      You say that like it's a bad thing. :)

      (But yes, Mac::Glue et al depend on sending AppleEvents and are unlikely to work on Wintendo.)

        In essence, it is a bad thing, seeing as how i neither own nor have access to a mac that I could use to do development on this project. .oO(I suppose I could install it on VirtualPC, but then I'd have to buy a Mac OS...)

        meh.