develooper Front page | perl.macosx | Postings from January 2002

Applescript and Shell inconsistencies

From:
CardConnection Response Team
Date:
January 23, 2002 11:07
Subject:
Applescript and Shell inconsistencies
Message ID:
3C4EBD72.65C4EB6B@cardconnection.com
Hello,
  I'm using a module (OSXMacperl.pm) which uses osascript to execute an
embedded applescript. The perl script runs fine from the terminal app on
the server however when I log in remotely via ssh the script starts
running then quites before completion. The app which the applescript is
supposed to launch opens however none of the subsequent commands get
executed.
  I was reading the osascript man and it warns of different shell's
special characters causing a problem if they're used within the
applescript.

1) Is it possible that the shell used by an ssh connection is different
that that used by the terminal utility?

2) Ultimately the script will be used as a cgi on a website. What shell
should the script be modified to accomodate?

3) Here's the actual applescript:

$script = <<EOS;
set theCommand to {"$gsCommands1$newFileLoc $gsCommands2 $gsCommands3"}
as string
tell application "RackMac1:Applications:MacGhostView:macps2pdf_osx:"
exec "gs theCommand"
end tell
EOS




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About