David,

Nobumi's statement:
        Do Script perl_arg mode Batch
doesn't open the regular Macperl window. Instead it opens a "Result" window 
that is managed by Applescript, and shows what the Macperl script produced. 
This window may hide behind the AS script window. It doesn't open if there is 
no output.

OTOH
        Do Script perl_arg
opens a Macperl window if and only if the Macperl script produced an output.

And if both statements are run:
        Do Script perl_arg mode Batch
        Do Script perl_arg
only the regular Macperl window opens.

Anyway this is what happens in my systems OS 7.5.5 and OS 9.0.4 !!

Best
- -
On Sun, 08 Jul 2007 05:47:12 -0700, David Micklem wrote:

Nobumi's method (with the direct tell application "MacPerl") works perfectly 
for me on OS9.2 and MacPerl 5.6.1.

However, I only get  output returned if MacPerl has previously ever had an 
output window open.

That is, if MacPerl isn't running, then it starts up OK when I run the script 
but I get no output/returned value. Re-running the script -> still no output.

But if I go into MacPerl and either run a script, or syntax check a script so 
that the MacPerl output window opens, then re-running the AppleScript gives me 
the expected output. Even after I close the MacPerl output window, running the 
AppleScript still works OK.

So, just out of curiosity, is it possible to make the script work WITHOUT the 
user having to manually go into MacPerl and persuade it to open an output 
window?

Reply via email to