How do I reference it with the 2 unknowns as parents?
Try 'UI element' by index, Coj:
UI element 4 (* or whatever *)
ps. After trying to script the Page Setup window of Notes I
realised that
the options for the destination printer, paper size and orientation
are
not accessible even with UI scripting. I even tried looking at it from
inside Safari, thinking that perhaps just Notes was useless but it
seems
to be an OS thing, not just app specific.
Printing is such a basic function, surely Apple would include these
things
for scripting... at least with UI!!!
If you're having difficulty registering clicks, and don't feel like
waiting for the remaining wrinkles in the UI scripting implementation
to be ironed out, check out Extra Suites: