Applescript - add a note with tags

53 views
Skip to first unread message

Philippe Martin

unread,
Nov 24, 2024, 4:21:58 PM11/24/24
to Yojimbo Talk
Hello,

This code (bookmark) works

set _new_item to (make new bookmark item ¬

with properties {name:"test"})

add tags {"T1", "T2"} to _new_item


While this code (note) does not

set _new_item to {make new note item with properties ¬

{name:"test", content:"this is text"}}

# Line below generates an exception [1]

add tags {"1", "2"} to _new_item


[1] Yojimbo got an error: Can’t make {note item id "9186FAF4-4721-44CD-9A83-43BDDBEE033D"} into type database item or tag collection.

Is there a mechanism to create a note and tag it at the same time?
Regards,
Philippe

Philippe Martin

unread,
Nov 24, 2024, 7:21:22 PM11/24/24
to Yojimbo Talk
Hi,
Actually got this [1] to work and realized my old eyes had missed that the bookmark example uses parenthesis and not curly brackets around "make"
Regards,
Philippe


[1]

set _new_item to make new note item with properties ¬

{name:"test", content:"this is text"}

add tags {"1", "2"} to _new_item


Patrick Woolsey

unread,
Nov 25, 2024, 9:20:53 AM11/25/24
to yojimb...@googlegroups.com
> On Nov 24, 2024, at 16:17, Philippe Martin <philippechri...@gmail.com> wrote:
>
> Is there a mechanism to create a note and tag it at the same time?

For the non-scripter :-) one can do so via the Quick Input Panel (F8 by default).


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <https://www.barebones.com/>


Philippe Martin

unread,
Nov 27, 2024, 8:44:16 PM11/27/24
to Yojimbo Talk
Thanks,
Regards,
Philippe
Reply all
Reply to author
Forward
0 new messages