Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • This is just crying to be rewritten using Mac::Glue. :-)

    #!/usr/local/bin/perl
    use warnings;
    use strict;
     
    use Mac::Glue ':all';
     
    my $itunes = new Mac::Glue 'iTunes';
     
    $itunes->activate;
     
    my $lesson = $itunes->display_dialog(
        'Enter the lesson:', default_answer => ''
    )->{text_returned};
     
    my $playlist  = $itunes->prop(view => window => 1);
    my @selection = $itunes->prop('selection')->get;
    my @tracks = @selection
        ? @selection