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

[MacPerl] Null argument from AppleScript



Hello. I'm a newcomer to this mailing list. I'm worring that my 
English may be poor because I'm not native speeker.
I have a question about IPC of MacPerl with AppleScript. I made some 
AS scripts which use MacPerl in it, but I found that an argument which 
contains null string is not correctly sent from AS to MacPerl. For 
example,

set FirstArg to "Hello, world!"
set SecondArg to "How are you, world?"
tell application "MacPerl"
    activate
    Do Script {"
        print \"$ARGV[0]...$ARGV[1]\";
    ", FirstArg, SecondArg}
end tell

this AppleScript above works right. However, when I set the first 
argument to null string as follows,

set FirstArg to ""
set SecondArg to "How are you, world?"
tell application "MacPerl"
    activate
    Do Script {"
        print \"$ARGV[0]...$ARGV[1]\";
    ", FirstArg, SecondArg}
end tell

the result becomes something like this:  Macintosh HD:MacPerl ト...How 
are you, world?

The $ARGV[0] doesn't contain that null string correctly. It contains 
some folder name, which I don't know the reason. Does somebody know 
how I can solve this problem?
Please forgive me for my poor En


Hiraku Ono
hono@mail.goo.ce.jp 

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch