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

Re: [MacPerl] Passing filenames to MacPerl using Applescript?



hello,

> I'm wondering is there is a way to pass file/folder names (i.e.
> @ARGV) to MacPerl via Applescript.

--Begin Applescrpt

set s to "HD:path_to:perl_script.plx"
set param1 to "HD:path_to:folder1"
set param2 to "HD:path_to:folder2"

tell application "MacPerl"
    Do Script {s, param1, param2} --mode Batch
end tell

-- mode Batch = redirect STDOUT to reply

--End Applescript

in MacPerl, $ARGV[0] will be param1, $ARGV[1] will be param2, etc.

-- 
Enrique Terrazas, MD, MS
<mailto:terrazas@labmed.ucsf.edu>
<http://pangloss.ucsf.edu/~terrazas/>


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