[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] I goofed! (corrected code)



That'll teach me not to post code I'm still working on!

#!perl -w

use Mac::Apps::Launch;
use Mac::Glue;
my $obj = new Mac::Glue 'Macjordomo_1_5fc8';

Hide('MacPerl', 1) or warn $^E;

for (;;) {
    sleep(10620);

    $obj->run();

    SetFront('LiSv') or warn $^E;

    $obj->connect();

    sleep(180);

    $obj->export( file => 'MycoinfoBrief Users', list => 'MycoinfoBrief' 
);
    $obj->quit();
}

This one actually works, instead of just pretending to.  I wasn't using 
the "export" event correctly.  Macjordomo even indicates that the list 
was exported in the logfile!  I push Macjordomo to the front, because 
after serveral HOURS the tendency is to forget that the script is running.

I still need a way to disconnect from PPP.  Aside: Isn't connect() a 
reserved word in Perl? (in context it seems okay, but I note that BBEdit 
colors it blue anyway (a more interesting shade of blue than the default 
from my settings).

--B

Brian McNett, Webmaster
*************************************************************
Mycoinfo. The world's first mycology e-journal.
http://www.mycoinfo.com/
*************************************************************


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org