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

Re: [MacPerl] That Do Script thing



At 19:30 -0400 2000.09.07, Quentin Smith wrote:
>set theScript to "Macintosh HD:test"
>set theArgs to {"arg1", "arg2"}
>tell app "MacPerl.PPC" to Do Script [theScript & theArgs]

This doesn't work for me.  But it gave me an idea.  This DOES work:

  set myScript to "print join '|', @ARGV"
  set myList to {"a", "b"}
  tell application "MacPerl" to Do Script [myScript] & myList mode Batch

The trick is to first coerce the script string (whether it is a filename or
the text of the script) into a list, and then & will combine the lists into
one list.  I knew there was a way to do it ...

-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/

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