At 11:27 -0500 01.29.2001, Steve Rothman wrote:
>And so it would be really easy to make a shellscript to do this.
>
>I've tried writing an AppleScript, and I can launch MacPerl and
>MHonArc from AppleScript just fine, but I can't figure out how to
>simulate typing in the command line. (There are a ton of posts on
>this topic in the MacPerl list archives, with many different
>solutions to this issue, but none of the solutions seem to work for
>me.)

        tell app "MacPerl"
                do script ["mhonarc", "mailboxname", "-outdir", ¬
                        ":outputpath", "-rcfile", "resourcefile.rsc", "-add"]
        end


You will probably need the whole path to "mhonarc" in there.

As to starting existing scripts ... you could possibly do:

        #!perl
        @ARGV = ("mailboxname", "-outdir", ":outputpath",
                "-rcfile", "resourcefile.rsc", "-add");
        do 'mhonarc';

Or you could, if you have MPW perl set up, do:

        #!perl
        my $cmd = 'mhonarc  mailboxname  -outdir  :outputpath  -rcfile ' .
                'resourcefile.rsc  -add';
        `$cmd`;

It should work just fine if "mhonarc" is in your MPW scripts folder.

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to