When calling a perl script from an apple script (by dropping a file on it), I get the error:
Can't load '/Library/Perl/5.34/darwin-thread-multi-2level/auto/Encode/Encode.bundle' for module Encode: dlopen(/Library/Perl/5.34/darwin-thread-multi-2level/auto/Encode/Encode.bundle, 0x0001): tried: '/Library/Perl/5.34/darwin-thread-multi-2level/auto/Encode/Encode.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Perl/5.34/darwin-thread-multi-2level/auto/Encode/Encode.bundle' (no such file), '/Library/Perl/5.34/darwin-thread-multi-2level/auto/Encode/Encode.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) at /System/Library/Perl/5.34/XSLoader.pm line 96. at /Library/Perl/5.34/darwin-thread-multi-2level/Encode.pm line 12.
When I call the script manually from terminal, it runs fine.
Why is Applescript running as X86 on M2?
Try this:
-
In Script Editor, create a new script like so:
display dialog "Hello Cruel World!" buttons {"OK"} default button "OK"
-
Save it as an application.
-
Launch it from the Finder.
-
Run Activity Monitor and, in the CPU tab, look for the value in the Kind column.
It should show Apple (for Apple silicon). What do you see?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"