Window objects

Get help using and writing Nisus Writer Pro macros.
Post Reply
Posts: 176
Joined: 2013-05-03 07:06:31

Window objects

Post 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.

User avatar
Posts: 1199
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Window objects

Post 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.

User avatar
Official Nisus Person
Posts: 4936
Joined: 2002-07-11 17:14:10
Location: San Diego, CA

Re: Window objects

Post 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.

Post Reply