Rosetta on the new M1 computers has some nice subtle bugs for AppleScript.
-
I’ve reproduced a bug with getting data from Gmail accounts.
property Mailbox0 : “mailbox name”
property Mailbox1 : “gmail account @ gmail . com”
property currentMessageStr : “1”
set currentMessage to currentMessageStr as integer
tell application id “com.apple.mail”
set theMessage to (message currentMessage of mailbox Mailbox0 of account Mailbox1)
if not deleted status of theMessage then
set theRes to (source of theMessage)
else
return “”
end if
end tell
Start Script Editor in Rosetta mode and execute the script. It will run into timeout and do nothing. That was the easy part.
-
One user of my application reported that getting data out of Outlook also has the same problem “do nothing until timeout”. I made him an application that executes the following script:
property Mailbox0 : “Inbox”
property Mailbox1 : “account name”
property currentMessageStr : “1”
set theResult to “”
set theCount to “”
with timeout of 10000 seconds
set currentMessage to currentMessageStr as integer
tell application “/Applications/Microsoft Outlook.app”
set theFolder to mail folder Mailbox0 of imap account Mailbox1
set theMessages to messages of theFolder
repeat with theMessage in theMessages
if not is marked for delete of theMessage then
set theResult to source of theMessage
set theCount to "got Source, " & theCount
else
set theCount to "deleted, " & theCount
end if
end repeat
return theCount
end tell
end timeout
However, I can’t reproduce the behaviour. Outlook works fine for me under Rosetta. Could someone try the Outlook script in Rosetta mode and report back?
I’ve already made a Feedback report for the Apple folks on the Gmail issue. I’ve also contacted Outlook support. But having a reproducible problem is always better.
The issues only show up in Rosetta mode. Unfortunately, a Universal version of my application is not yet possible.