From man osascript: NAME osascript - execute OSA scripts SYNOPSIS osascript [-l language] [-e command] [-s flags] [programfile]
DESCRIPTION osascript executes the given script file, or standard input if none is given. Scripts may be plain text or compiled scripts. osascript was designed for use with AppleScript, but will work with any Open Scripting Architecture (OSA) language. To get a list of the OSA languages installed on your system, use osalang(1). For documentation on Apple- Script itself, see <http://www.apple.com/applescript>. The options are as follows: .... It seems you can launch /usr/bin/osascript from perl and have that command run your Applescript ... you aren't trying to get output from AppleScript back into the perl script are you? If so, you might want to play with the options for getting script output to print where you want (so you can stuff the output into a perl variable and parse it). Your link below looks like it allows AppleScript users to use the perl they know inside AppleScript, not call AppleScripts from inside perl .... but this is just from a glance. The tool below might be a way to use the Perl and AppleScript all inside AppleScript, keeping you from having to pass data from AppleSript to perl.... Hope this helps. Some people just haven't seen osascript.... Take care, --Chris On Tuesday, September 24, 2002, at 08:03 PM, Rob Barris wrote: > > I have two snippets of AppleScript that I want to be able to > execute from a Perl program....How would I go about translating either > of these scripts into a form that I could embed in a Perl program? > > Can I just take the raw text (after having dealt with any variable > references and moving data between the Perl world and the AS world) > and run it as shown here in the link below? > > http://search.cpan.org/author/JLABOVITZ/Mac-AppleScript-Glue-0.03/ > Glue.pm > (under "FUNCTIONS")