[AppleScript] How to force font size in Notes app when pasting from clipboard?

Hi all, I'm a total newbie at AppleScript. Hope I can find some help here:)

I have put together a script that will copy the text I have highlighted on Safari, and paste it into a specific Note with just a keyboard shortcut.

However, I realised when the text gets pasted into the Note, the is almost like the default font size, which is very small. I have tried changing the default font size under Note > Preferences, but the pasted text causes the sizes of the other text to get smaller and smaller every time I run the script, until all reaches the smallest size of 8.

Is there any script I can include to force it to adhere to the system default when the text is pasted in?

Here is the script I have written:

-- Copy selected text to clipboard: tell application "System Events" to keystroke "c" using {command down} delay 1

set noteName to "My Note"

set entry to return & (the clipboard)

tell application "Notes"
tell account "iCloud" set body of note noteName to (get body of note noteName & entry) end tell
end tell

Answered by gnohz in 726069022

If anyone's interested, the solution can be found here: https://apple.stackexchange.com/questions/445952/how-to-fix-font-size-in-notes-app-when-pasting-from-clipboard/446021

Accepted Answer

If anyone's interested, the solution can be found here: https://apple.stackexchange.com/questions/445952/how-to-fix-font-size-in-notes-app-when-pasting-from-clipboard/446021

[AppleScript] How to force font size in Notes app when pasting from clipboard?
 
 
Q