Stupid Mac::Glue Tricks
I have my PowerBook sometimes connected to an external monitor. When MacCvsX leaves a window on the external monitor, it keeps it offscreen, whereas most applications will put the windows on the current monitor (or make it easy to arrange them on the current monitor). So I lose the Console Window forever, unless I can hook it up to a monitor, or ...
#!/usr/local/bin/perl(Requires most recent Mac::AppleEvents::Simple, v1.07.)
use Mac::Glue;
my $cvs = new Mac::Glue "MacCvsX";
my $bounds = $cvs->prop(bounds => window => "Console Window");
my $d = $bounds->get;
$bounds->set(to => [20, 100,
$d->[2] - ($d->[0] - 20),
$d->[3] - ($d->[1] - 100)
]);
Leave a comment