Stupid Mac::Glue Tricks

| | Comments (0)
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 ...

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)

(Requires most recent Mac::AppleEvents::Simple, v1.07.)

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on October 30, 2003 2:27 PM.

Gay Bishop was the previous entry in this site.

Mac-Carbon-0.62 Released is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.