In other words, I didn't get a lot of sleep last night, I thought a whole bunch today, and between the two I'm pretty tired.
The question was raised: Could Perl do what AppleScript can? i.e., make the remote control application do what it's supposed to do, instead of the useless behavior it currently engages in? I'm sure there's a way to do it, I just don't know it yet. Perhaps if I get my hands dirty a little bit inside some OS X documentation, I can route around this oncoming AppleScript debacle.
Anyway, I'm just keeping track for myself here: Gotta figure out what Linux would be best for this place as a play server, gotta figure out how to make the remote app work properly, gotta figure out what I'm doing wrong in Matriarch. Gotta this, gotta that. Hell, at least I'm busy.
I'm actually mulling the notion of working here after my school-credit internship's over, asking if they want me for a few more months at the cover price or possibly as a volunteer. Right now I'm only sinking maybe ten physical hours a week, tops. I could do that without blinking, I suspect. My main concern would be gas money, but that seems to be handling itself right now.
Besides -- it's not like I wouldn't be hacking Perl on my own time anyway, and it would be good resume fodder.
Second, there is Mac::Glue, which currently is being ported to Mac OS X. It allows you to use Perl syntax with an AppleScript vocabulary. It's been in use for many years on MacPerl and will rely on Mac::Carbon (once Mac::AppleEvents is ported to Mac::Carbon, which is in progress). It allows stuff like:use MacPerl 'DoAppleScript'; # module named MacPerl, runs on Mac OS X anyway
my $name = DoAppleScript('tell app "iTunes" to get name of current track');
And of course, you can call methods like play, stop, etc. The "glue" for an app is created with a simple droplet or command-line program.use Mac::Glue;
my $iTunes = new Mac::Glue 'iTunes'; # 'tell app "iTunes"
my $nameobj = $iTunes->obj(name => of => 'current_track');
my $name = $iTunes->get($nameobj);