I want to programmatically/automatically make some changes to TextEdit RTF files.
As an example, but no limited to, I want to be able to set the font color and the background color to something more relaxed than hard black and white.
The way I would do it manually is to open the Fonts editor with ⌘T and then click on the appropriate buttons, one for the font color and one for the page background, then doing the same again with the Color popup dialog for each of them, picking the style of color picker and then picking the color within those choices. To do this in KBM, I would have to do a series of at least six Click on Found Image actions. I would rather do mouse clicks relative to the bounds of these dialog windows instead of doing image matching.
But even this is problematical because I can't even find the Fonts window or the Colors window on the screen, I can't get it listed among the app windows. So instead of searching just a local region of the window menu for the button, I have to search the whole screen, because I can't control or predict exactly where the Fonts and Colors dialogs will appear. Yet I know at some level it's treated as a separate window because when I do a screenshot using ⌃⇧⌘4, I can pick the dialogs as windows, as I did above.
Also, these dialogs appear to act like utilities, not as menus within the app. They can be opened in various different apps and if I make changes to the dialog size in one app, when I close that app and open the dialog in a different app, the size change carries over to the new app. That means that I cannot reliably count on the image size of the whole dialog and match it as an image and click relative to that whole image.
I would really rather do this programmatically, but since there is no text on those buttons, they don't seem to be any more findable in KBM v11 than they did before. And there is no "background" attribute listed in the AppleScript dictionary for TextEdit.
Anyone have any ideas?