Just been asked about detecting and setting the expansion state of notes. The short answer is that nodes in the content panel have a note expanded property.
or, for a broader brush:
Code:
tell application id "OFOC" tell default document tell front document window tell content set oNode to leaf id "eV0HtQ2RJIi" -- choose some task by id, for example if not note expanded of oNode then set note expanded of oNode to true end if end tell end tell end tell end tell
Code:
tell application id "OFOC" tell default document tell front document window tell content to set note expanded of leaves to true end tell end tell end tell