Thank you guys both, I really appreciate the effort 🙂 I run into some absolute Automator beginner problems though.
- I restarted OSX in English, to make debugging this a little easier
- I started Automator
- Created a new document
- Choose 'Service'
- Choose from the Library: Utilities, from the 2nd column 'Run AppleScript' and dragged it to the 3rd column.
- Typed the code from VikingOSX
- Saved it as 'strikeThrough attempt 2'
However, I don't get the color coded look / syntax highlighting on the appleScript and it won't compile, giving a 'syntax error' on line 7:
set flag to (window "Fonts" exits)
The code as I typed it from the screendump:
tell application "System Events"
set activeApps to name of application processes whose frontmost is true
set activeApp to item 1 of activeApps
try
tell process activeApp
set flag to (window "Fonts" exits)
if not flag then
keystroke "t" using {command down}
repeat until window "Fonts" exists
end repeat
end if
tell group -1 of splitter group 1 of window "Fonts"
tell menu button 1 of group 1 of group 2
click
click menu item 2 of menu 1
end tell
end tell
if not flag then keystroke "t" using {command down}
end tell
on error theError number errorNumber
tell me
activate
display dialog "An Error has occurred:" & (errorNumber as text) & return & return & theError buttons {"OK"} default button {"OK"} with icon stop
end tell
end try
end tell
In the menu Mail, Services of Mail, it shows up so that is one thing going right. Can you give me a hint how to get the script working on my machine?