Self Service AppleScript/Bash works on non M1 PPPC

Frosty
New Contributor II

Hi I hope you can help..

I have just created some simple bash scripts which run Applescripts via osascript so users can then run from SelfService to add signatures to Outlook or Apple Mail. (Big Sur)

The PPPC all works and everything works on Intel.

But on the M1 mac the scripts fail or request authentication so ignoring the PPPC profile and when it run after accepting it doesn't do as the script intended so no signatures are added.

I must be missing something somewhere? Can some one point me in the right direction please? Is there a PPPC setting for rosetta? or something else.. Thanks Rob

3 REPLIES 3

talkingmoose
Honored Contributor II

Specific to Microsoft Outlook, it has a preview mode that anyone can turn on to change to "New Outlook", which has a redesigned interface and different underlying code. Be sure you're testing against the "old" Outlook because the newer version does not support AppleScript.

Frosty
New Contributor II

Thanks talkingmoose it seems that the M1 Macs just don't like the code they are on the older Outlook Settings. I have posted the scripts below in-case anyone can see the reason maybe? The scripts run fine on Intel Macs the M1s run through the script as if installed but doesn't create the signatures.. very odd a little stumped.

Outlook:

#!/bin/sh
 
/usr/bin/osascript <<EOF
property includeInRandom1 : false
property sigName1 : "Proposals"
property sigContent1 : "Proposals"
property includeInRandom2 : false
property sigName2 : "General IP Disclaimer"
property sigContent2 : "General IP Disclaimer"
property includeInRandom3 : false
property sigName3 : "Design File Release"
property sigContent3 : "Design File Release"
property includeInRandom4 : false
property sigName4 : "Print Testing File Release"
property sigContent4 : "Print Testing File Release"
 
 
tell application "Microsoft Outlook"
if exists signature "Proposals" then
delay 1
else
try
set newOutlookSignature to make new signature with properties ¬
{name:sigName1, content:sigContent1, include in random:includeInRandom1}
set newOutlookSignature to make new signature with properties ¬
{name:sigName2, content:sigContent2, include in random:includeInRandom2}
set newOutlookSignature to make new signature with properties ¬
{name:sigName3, content:sigContent3, include in random:includeInRandom3}
set newOutlookSignature to make new signature with properties ¬
{name:sigName4, content:sigContent4, include in random:includeInRandom4}
end try
end if
end tell
EOF

Apple Mail:

#!/bin/sh
 
/usr/bin/osascript <<EOF
tell application "Mail"
if exists signature "Proposals" then
delay 1
else
try
tell application "Mail"
make new signature with properties {name:"Proposals", content:"Proposals"}
make new signature with properties {name:"General IP Disclaimer", content:"General IP Disclaimers"}
make new signature with properties {name:"Design File Release", content:"Design File Release"}
make new signature with properties {name:"Print Testing File Release", content:"Print Testing File Release"}
end tell
end try
end if
 
end tell
EOF

Id love to get this working on M1's too, if anyone knows why this isn't working and how to get it to work that would be fantastic..
Thanks
Rob


 

mschroder
Valued Contributor

I see a similar problem with a script that works fine on Intel Macs but fails on M1 Macs, I fear there are still a few bugs in macOS for M1...