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

[MacPerl] MacPerl->Applescript->MacPerl



I have searched Sandra Silcott's MacPerl archive but couldn't find what I
wanted.

I want to write a cgi that calls an Applescript Applet, which after doing
it's nasty little thing will return data to the CGI for spittage out to the
Browser.


#!perl


$times = 4;

MacPerl::DoAppleScript(<<END_SCRIPT);
tell application "Yet Another Test"
        set $x to doMe($times)
end tell
END_SCRIPT

print $x;


the Applescript just returns "You've been done $times times". But of course
i don't get nuttin'

are you supposed to say my or local to get the $times into the applescript
variable $times? and How do I get data out of the DoAppleScript into the
perl portion of the script?

I did read a message about sending data to the perl script from an
Applescript using the Send Data event and then reading STDIN but much like
a neutered dog I don't get it.

Thank You!


--------------------------------------
andyk@teleport.com
andy@illuminatus.com
monkeyboy@illuminatus.com
---- Small Advertising Assault follows ---
New Improved Netscape Magic Cookie Pages: http://www.illuminatus.com/cookie
The World Famous Algae Pages: http://www.illuminatus.com/algae
Used/Demo/Refurbished Macs: http://www.macpac.com/
------- The Quote----------
SCSI is *NOT* magic.  There are *fundamental technical reasons* why it is
necessary to sacrifice a young goat to your SCSI chain now and then.
                                            --jfw@proteon.com (John Woods)