Re: Applescript call from Perl
In article p05101401b888f79cab91@[203.47.34.3], [EMAIL PROTECTED] (Peter N Lewis) wrote: At 21:13 -0500 7/2/02, Brad Rice wrote: How do you call Applescript from Perl? I want to make a CGI that runs an applescript. In MacPerl, use: MacPerl'DoAppleScript(END_SCRIPT); tell application Finder move alias $folder to trash end tell END_SCRIPT I believe MacPerl can also do raw AppleEvents. Yeah. MacPerl also has Mac::Glue, a sorta AppleScript in Perl framework: use Mac::Glue; my $finder = new Mac::Glue 'Finder'; $finder-move( $finder-obj(alias = $folder), to = $finder-prop('Trash') ); Or one of my favorites: :) $interarchy-edit( path = $rpath, host = $host, user = $user ); $bbedit-compare( $bbedit-obj(window = 1), $lpath ); When we get Carbon running on Mac OS X, I'll be porting Mac::Glue, too. In Mac OS X Perl, use /usr/local/bin/osascript, man osascript for info on how to use it and send the data to it from the Perl script. Is there any other ways? There's a MacPerl module for Mac OS X with a similar interface to the MacPerl module in MacPerl, whish uses osascript. http://news2.ils.uec.ac.jp/~herr/ http://news2.ils.uec.ac.jp/~herr/OSXMacPerl-0.1.gz -- Chris Nandor [EMAIL PROTECTED]http://pudge.net/ Open Source Development Network[EMAIL PROTECTED] http://osdn.com/
Applescript call from Perl
How do you call Applescript from Perl? I want to make a CGI that runs an applescript. Brad Rice [EMAIL PROTECTED]
Re: Applescript call from Perl
Can ACGI run with Apache? I thought you needed to have webstar or another Mac Classic web server to use that. On Thursday, February 7, 2002, at 10:09 PM, Kime H. Smith, Jr. wrote: Hi, Brad: Why not just write the CGI in APppleScript? If written as an ACGI, it can be pretty efficient. The other possibility is to use the system() function in Perl to do what you feel you need to use AS forjust a thought. Kime Smith MediaKinematics -Original Message- From: Brad Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 6:13 PM To: [EMAIL PROTECTED] Subject: Applescript call from Perl How do you call Applescript from Perl? I want to make a CGI that runs an applescript. Brad Rice [EMAIL PROTECTED]
Re: Applescript call from Perl
At 21:13 -0500 7/2/02, Brad Rice wrote: How do you call Applescript from Perl? I want to make a CGI that runs an applescript. In MacPerl, use: MacPerl'DoAppleScript(END_SCRIPT); tell application Finder move alias $folder to trash end tell END_SCRIPT I believe MacPerl can also do raw AppleEvents. In Mac OS X Perl, use /usr/local/bin/osascript, man osascript for info on how to use it and send the data to it from the Perl script. Is there any other ways? Enjoy, Peter. -- http://www.interarchy.com/ ftp://ftp.interarchy.com/interarchy.hqx