Post

Replies

Boosts

Views

Activity

Interacting with the Notes application
Hello, Relatively new to AppleScripts in current gen (I've used it back in 2010s) and would like some help if someone can point me in the right direction. Is AppleScript the best/only way to interact with Notes application? (I'm on Sequioa) 1.1 I've tried to use LLM to generate a Swift app, but it still calls out to AppleScripts, so I'm wondering if I'm missing something. 1.2 If I'm going down a rabbit hole, I'd like to stop since I want to finish this quick task and move on and or fall deeply in love with AppleScripts... whichever comes first. Is There a better way to write notes? Script Editor is still a minimal IDE, I'd love to find something that will do some auto completion/suggestions because the documentation in the Script Editor is still a tad weak. (I'm used to interpreted languages like bash, ruby, etc...) where if I don't understand something I just dig into the code instead of turse documentation that just exposes public end points and does not tell you much more :( My problem: I'd like to set up a cron that periodically checks my notes, and cleans up the shared notes. Basically it's a shared set of notes that have checklist on it and cleans up. (weekly chores etc...) I want to read the notes, find out which ones have been marked checked. Reset the ones that are done, leave unfinished ones alone and reset the old ones. This is how far I've gotten: let appleScript = """``` tell application "Notes" set targetNote to note "\Test" of default account return body of targetNote end tell That works like a charm, Kind of dumb because I rather use and ID of the note not the name :( It returns the following <div><b><span style=\\"font-size: 24px\\">Test</span></b></div> <div><br></div> <ul> <li> Not Done</li> <li>Done</li> <li>Not Done yet</li> </ul> <div><br></div> <div>Single line</div> Which is a good start! Issues: There is no way to tell which Item is marked "Checked" and which one is not :( Any helps is greatly appreciated!
1
0
269
Mar ’25