tell application "TextEdit"
activate
do shell script "Sleep 1"
tell document 1
tell application "System Events" to tell process "TextEdit"
try
keystroke "s" using command down
do shell script "Sleep 1"
keystroke "2016-12-21 121212Z"
do shell script "Sleep .4"
# keystroke (ASCII character 9)
click pop up button 1 of group 2 of sheet 1 of window 1
do shell script "Sleep 1"
try
click menu item "Desktop" of menu 1 of pop up button 1 of group 2 of sheet 1 of window 1
end try
do shell script "Sleep 1"
click pop up button 1 of group 1 of group 1 of sheet 1 of window 1
do shell script "Sleep 1"
try
click menu item "Rich Text Document" of menu 1 of pop up button 1 of group 1 of sheet 1 of window 1
end try
do shell script "Sleep 1"
click button "Save" of sheet 1 of window 1
on error errmsg number errnum
tell application "System Events" to display dialog "Major Error: Code error in fileAndMailHandlingSubRoutineSaveAsrtf whilst preparing trying to save rtfd document with TextEdit. Error number " & errnum & " Error " & errmsg as text giving up after 20
end try
end tell
end tell
end tell
Trouble is, I’ve lots of different files to save. This latest update to Sierra has really thrown aspanner in three works.
Please, any thoughts
Regards
Santa