> Hello.
>
[quoted text clipped - 19 lines]
> determining what 'project' was being worked on - and report summary info
> aggregated in various ways.
Tim, sorry, I missed this post before. I don't read the list too often
(through an RSS reader, and I've been neglecting most of what's in there
lately!).
Here's some code that will do what your AppleScript does:
#!/usr/bin/perl
use warnings;
use strict;
use Mac::Glue ':all';
my $sysevt = new Mac::Glue 'System Events';
my $app_name = $sysevt->prop(
name => item => 1,
application_process => whose(frontmost => equals => 1)
)->get;
my $app_glue = new Mac::Glue $app_name;
my $window_name = $app_glue->prop(name => window => 1)->get;
As you can tell, that's basically what you were already doing.
There's actually a script I wrote called "happening" that was covered a bit
in an O'Reilly Mac OS X Hacks book. Unfortunately, the Mac::Glue version
will only work for getting the frontmost window for applications where
you've already created a glue for it (with `gluemac` on the command line).
The script runs in the background and sets my iChat status to my app and its
frontmost window, if I want it to. Does lots of other similar things too,
like looking at what I am listening to or watching.
http://dev.macperl.org/files/scripts/happening
Cheers,
--Chris
In article
<20061121224835.GA5239@ip-192-168-1-101.internal.terminal.newtec.be>,
> > Hello.
> >
[quoted text clipped - 40 lines]
>
> Tim.

Signature
Chris Nandor pudge@pobox.com http://pudge.net/
Open Source Technology Group pudge@ostg.com http://ostg.com/