I've got a fairly complex Perl/Tk application that I'm rebuilding with PAR on a Mac for the first time in ages. I'm having a problem with Mac::AppleScript that I can't figure out.

Here is the relevant section of the code:

        elsif ( $^O eq "darwin" )
        {
            return
              if (
                RunAppleScript(
qq(tell application "System Events" to (creator type of processes) contains "Audn")
                ) eq "true"
              );
            print "Starting AppleScript\n" if $debug;
RunAppleScript(qq( tell application "Audion 3"\nactivate \nend tell))
              or infobox(
                $mw,
                "Audion Error",
"AppleScript could not find Audion. You will probably want to download the app and put it in the Applications folder. Otherwise you will not be able to, in a word, 'play' any music. $@"
              );
            print "Finished AppleScript\n" if $debug;
        }

If I run the script straight from the command line, it works fine. However, if I do a "pp -o mrvoice mrvoice.pl" and then run the resulting "mrvoice" file, it bombs out with an AppleScript error "-1753", which appears to be a "Script Error".

Any ideas what might be causing this AppleScript problem when running under PAR?

Thanks,
Wade

Reply via email to