Hi,
Just wondering, I’ve created an Automator action as a Finder Service to process a bunch of PDF files into PNG images, but there’s a problem where the system’s (macOS 10.13) LCD font smoothing adds red & blue fringing to the edges of text.
I realised I can stop that happening if I disable LCD Font Smoothing in the System Preferences, so I hacked together a little bit of Applescript from examples I found online to do the following before it starts processing the files:
tell application "System Preferences"
activate
reveal pane id "com.apple.preference.general"
delay 1
end tell
tell application "System Events"
click checkbox "Use LCD font smoothing when available" of window "General" of process "System Preferences"
end tell
tell application "System Preferences"
quit
end tell
I put another copy at the end of the Automator action, so to run it, I select all my pdfs in Finder, right click, Services, my service… Then the system opens System Preferences, toggles LCD Font Smoothing, quits system preferences, runs the automator actions for converting PDF to PNG, then reopens System Preferences, toggles LCD Smoothing back on, & quits System Preferences.
First time I ran it, it didn’t work because of a security dialogue.
Eventually I was able to get it to work be adding Finder to the fist of applications that were ticked to be allowed to control the computer, but I’m wondering if there’s something more specific I should use - Automator is already enabled.
Looking online, macosautomation.com recommends /System/Library/CoreServices/ServicesUIAgent but that doesn’t appear to be on 10.13.
Is there a 10.13 equivalent to allow Applescripts in Automator Actions to control System Preferences etc?
edit I disabled Finder Access and tried to run it again, and this time it asked for Finder access, so I guess that means enabling Finder is the right solution?
Thanks.