M1 mac • Script to check if outlook runs in rosetta2 mode

Hi,

For outlook automation to send emails with applescript from 4th-Dimension I use

Launch External Process(“osascript pathtoSCPTfile”;stdin;stdout;sterr)

Some applescript breaks on the new silicon M1 macs. To solve this I can switch outlook manually to rosetta mode and open it again.

But, is there an applescript or shell command to check if outlook runs in native or rosetta mode ?
And is there an option to switch outlook to the rosetta 2 mode via script ?

problematic applescript commands are:

set theMessage to make new outgoing message with properties

if “content” is a complex html. I’ve found out, if there are more than one tags inside, the script breaks calling from an intel 4th-dimension version. Switch outlook to rosetta mode solves the problem.

set theBody to plain text content of currentMessage

Also get the plain text content on some html emails from outlook breaks the script if outlook is in native silicon mode

To avoid errors and frustruation, I like to check possible errors before they call the hotline.

Thanks Armin

P.S.: The scripts works fine and stable since more than 10 years on intel macs and if I switch outlook to rosetta 2, than it works also on apple silicon. Tested with latest outlook beta and macOS 11.3beta
And they works fine too, running the script with Script Editor and Terminal osascript.
The break if called from an intel app in rosetta mode if outlook is in ARM64 mode