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

[MacPerl] Value returned of a script



There must be a ridiculously simple answer to this.

I want to get the result of a MacPerl script using Apple Events.  The only way I have succeeded is by sending an event to close the window "MacPerl", another to tell MacPerl to print the result and a third to get the text of the window, as in the script below.  What I want to be able to do is 'set x to (do script theScript)' and have the result put into x.
 


       tell app "MacPerl"
         try
           Close Window "MacPerl"
         on error
         end try
         Do Script ¬
           "#!perl
       $s = \"hello\";
       print $s"
         set s to Text of Window "MacPerl"
       end tell

       
JD


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