You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Is it possible to write an AppleScript to force Notes to use specific fonts?

Yes, using the fonts I prefer is not essential, but I spend a lot of time selecting text and changing it to Helvetica Neue Light (/System/Library/Fonts/HelveticaNeue.ttc) or a couple of other variants.


I tried looking into Automator and AppleScript and found some scripts I could copy and try. When they didn't work I made alterations but I'm not a scriptwriter. I don't know what I'm doing. I got a few scripts to run but the result is always the same: the colour, size and variant might change but the font result is always "System Font (Default)". When I recorded the action of selecting the font, the result just said something like "click on document" with no reference to selecting a font. This is one that runs but doesn't change the font:


tell application "Notes"

set the noteBody to "<html>

<!DOCTYPE html>

<html>

<body>

<h3 style=color:#CC6699;font-family:HelveticaNeue-Bold;font-size:150%;>This is not the header I want</h3>

<p style=font-family:HelveticaNeue-Light;font-size:150%;>This is a paragraph.</p>

</body>

</html>"

make new note at folder "Notes" of account "iCloud" with properties {body:noteBody}

end tell


It's an old machine, a late-2013 27" iMac running Catalina 10.15.7.


If anyone can solve this, a thousand thanks in advance!

iMac 27″

Posted on Oct 2, 2024 8:07 PM

Reply

There are no replies.

Is it possible to write an AppleScript to force Notes to use specific fonts?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.