Page 1 of 1

Window objects

Posted: 2018-12-07 07:58:52
by Vanceone
So while researching an answer for a question about palettes not fully on the screen I discovered that there appears to be no way to access the window positions in the macro language. You can show and hide the window but moving it appears to not be possible? You have to use applescript, I think, to move the window.

But that works for windows, and I think dialogs like the Find window are also considered "windows." Palettes are a different beast? In any case, being able to access the window's rects, sizes, positions, etc via the macro language instead of being forced into Applescript seems like a good idea.

For that matter, it appears that palettes are unable to be accessed at all via macro or applescript. Or controllable via keyboard. Is that right? If so, that's a shame.

Re: Window objects

Posted: 2018-12-07 08:50:20
by phspaelti
This is not correct. The window position and size for a document window can be accessed and also changed using the Nisus macro language.This is done using document properties: $doc.windowOrigin and $doc.windowSize (I'm pretty sure I have posted a macro example like that on this forum somewhere.) But you are probably correct that Nisus can't change/reposition the windoids that make up the floating palettes.

Re: Window objects

Posted: 2018-12-07 09:45:53
by martin
Philip is right: you can programmatically position document windows using the Nisus macro language, but not palette windows. Macros have no access to palettes.