Creating a new note in a specific Sub-Context

Hey there! I have a question on how to use AppleScript to contexts that appear to have the same name. For example, when an upcoming album hits my radar I add it to the context Store : iTunes and when I own an album that I still need to listen to, I add it to the context Library : iTunes. Of course, first flattened context will add it to the first instance of iTunes in the list.

Is there a more concrete/solid way of targeting the two that I am just overlooking?

Oh hey, I figured this out from semicolons

set theContext to first flattened context where its name = "iTunes" and the name of its container = "Store"
set theProject to first flattened project where its name = "Someday" and the name of its folder = "Movies"

Solved!

3 Likes

Thanks for posting your solution so other folks can benefit too.

1 Like