... Maybe i should explain the whole thing a bit more detailed. The pdftex application has a feature called write18 command which is used to access unix shells from within TeX documents. I recently found out that this works also under OS 9.2.2. I have no idea how Tom Kiffe did this and i don't think i would understand it but if a have a simple hello world script saved as a droplet i can call it from a TeX file.
I very rarely used droplets but @ARGV is the files dropped on it, so the following extremely basic script
for (@ARGV) {open F, ">$_.bak" ;}
will create a .bak file for every file or folder dropped on it. Hence the name droplet. I've never used them otherwise. However you could also sdo the equivalent of dropping like this:
set _pathlist to {} tell application "Finder" repeat with _item in (get selection) set end of _pathlist to _item as alias end repeat open _pathlist using application file "test2.plx" end tell
That leads me to my basic questions: Is it possible to get the information from the AppleEvent call in a MacPerl script?
Yes, but I would not do it with a MacPerl droplet. I'd do it with an Applescript applet, stay-open if you're going to be using it often.
Suppose the applet has the following script, and you send the event
tell app "path:to:applet" to readWords("one two three")
Then the applet will build the perl script with your arguments and get MacPerl to run the script. If you want the results returned to the AppleScript script, then use mode batch.
readWords("one two three") -- testing only ----- on readWords(_string) set _perlscript to " @words = split / /, q~" & _string & "~; foreach $word (@words) { ++$i ; print qq~$i\\.\\t$word\\n~ };" tell application "MacPerl" to Do Script _perlscript mode Batch end readWords -----
I remembered the AETracker app on the MacPerl-CD but it's not really stable with my system
It never was with mine either. Get CaptureAE from:
<http://www.westcodesoft.com/downloads/octools.html>
JD