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! |
|---|
In reply to Re: iTunes lacking on CPAN...
by jasonk
in thread iTunes lacking on CPAN...
by stonecolddevin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |