Hi folks,
Really weird issue, hope someone can shed some light on it. I have the following script that works as intended in Script Editor but when inserted in an ASOC project, does not run at all, with no errors.
set sigName to "Name of Signature"
tell application "Microsoft Outlook" to activate
tell application "System Events"
click menu item "Preferences..." of menu 1 of menu bar item "Outlook" of menu bar 1 of application process "Outlook"
click item 1 of (buttons of window "Outlook Preferences" of application process "Outlook" whose description is "Signatures")
if ("Microsoft Outlook.app" is in (do shell script "ls /Applications")) then
-- OUTLOOK 2016
click pop up button 2 of group 2 of window "Signatures" of application process "Outlook"
click menu item sigName of menu 1 of pop up button 2 of group 2 of window "Signatures" of application process "Outlook"
click item 1 of (buttons of window "Signatures" of application process "Outlook" whose description is "close button")
else -- OUTLOOK 2011
click button "Default Signatures..." of window "Signatures" of application process "Outlook"
repeat with thisRow in rows of table 1 of scroll area 1 of sheet 1 of window "Signatures" of application process "Outlook"
click pop up button 1 of thisRow
click menu item sigName of menu 1 of pop up button 1 of thisRow
click button "OK" of sheet 1 of window "Signatures" of application process "Outlook"
click item 1 of (buttons of window "Signatures" of application process "Outlook" whose description is "close button")
exit repeat
end repeat
end if
end tell
end try
Essentially it’s making a specific signature the default. This is Xcode 7 with El Cap.
thanks