Timeline for Can an AppleScript write to a Notes.app document?
Current License: CC BY-SA 3.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 12, 2019 at 16:54 | comment | added | Peter Schorn | @Kent that doesn't open the note, or even navigate to it if Notes is already running; it just retrieves the text. How do I open the note? | |
Dec 4, 2019 at 1:02 | comment | added | Kent | You can open a note via the second code block above. You have to know the name of the note though. | |
Dec 3, 2019 at 22:36 | comment | added | Peter Schorn | How do you open an existing note? Could someone provide me with an example script? | |
Aug 18, 2017 at 19:38 | comment | added | rubik's sphere | I'm on 10.11.6. I guess that it is an El Capitan bug. | |
Aug 18, 2017 at 6:29 | comment | added | Kent | I'm stumped. I'm on Sierra 10.12.6 ; but, that shouldn't matter. The only difference is that you have the iCloud enabled and I don't. But, I don't see why changing "On My Mac" would cause Notes to spin out of control. | |
Aug 18, 2017 at 5:05 | comment | added | rubik's sphere | Here is a .gif that shows what happens when I try to modify a Note in my "On My Mac" account. | |
Aug 18, 2017 at 4:48 | comment | added | Kent | Hmmm... That might be iCloud related. When I run with either "Exchange" or "On My Mac" account, it finishes immediately with the new text. | |
Aug 18, 2017 at 4:46 | comment | added | rubik's sphere | Here is a .gif that shows what happens when I try to modify a Note. | |
Aug 18, 2017 at 4:15 | comment | added | Kent | Yes, running all three of the commands above resulted in a note named "reset the body text". The note must be named exactly as what you type in the command ("this is a test", in the example). Setting the body once will actually change the name to "reset the body text", So, I'd check that the notes are named correctly, or maybe try to make a note without spaces in the name, etc. | |
Aug 18, 2017 at 3:57 | comment | added | rubik's sphere |
I can successfully get body of note , but every time that I try to set body of note , nothing happens (even when the replacement text is proper HTML). Does it work for you?
|
|
Aug 18, 2017 at 2:44 | comment | added | Kent | Yep. I modified the answer. You'll probably want to set a variable with the original text, and make modifications before setting the body to a new value; but, that's not difficult. | |
Aug 18, 2017 at 2:42 | history | edited | Kent | CC BY-SA 3.0 |
Expand, with how to read/write existing note
|
Aug 18, 2017 at 2:33 | comment | added | rubik's sphere | Do you know if it's possible to edit an already-existent note? Or, do you have to create a brand new note each time? | |
Aug 18, 2017 at 2:18 | comment | added | bjbk | I tested this with my iCloud account and it works just fine. Nice one, @Kent | |
Aug 18, 2017 at 2:12 | history | answered | Kent | CC BY-SA 3.0 |