One of my personal favorites is to use a "here document" to supply the code for an applescript via osascript. i.e.
----------------------------------------------- #!/bin/perl -w use strict; use IPC::Open3; my $script = <<'APPLESCRIPT'; tell application "Finder" display dialog "Hello World" end tell APPLESCRIPT # using a "here document" can mess with the debugger line numbering, # so include a line comment for it #line 15 local *script_to; local *script_from; local *script_error; my $pid = open3(*script_to, *script_from, *script_error, "/usr/bin/osascript") or die "Couldn't open osascript"; print script_to $script; close script_to; while (<script_from>) { print "result: $_\n"; } close script_from; while (<script_error>) { print "error: $_\n"; } close script_error; ------------------------------------------ On 10/13/03 6:58 AM, "Doug McNutt" <[EMAIL PROTECTED]> wrote: > I do use AppleScript for that kind of thing. I'll try to find some samples for > you.