Code: Select all
tell application "Nisus Writer Pro"
set windowList to windows
--the focus window is always window 1
--hidden windows are in the list but have their visible set to false
--miniaturized windows have their visible set to false
--windows in other spaces *are* visible, but I don't know how to distinguish them
set topWindow to the first item of windowList
set windowBounds to bounds of topWindow
set bottomWindows to the rest of windowList
repeat with aBottomWindow in bottomWindows
if aBottomWindow is visible then
--display dialog name of aBottomWindow as string
set bounds of aBottomWindow to windowBounds
end if
end repeat
end tell
This will allow you to use command tilde to rotate between documents in the current space. It does have the same problem that others did, of not knowing if windows are in the current space or not. It does, however, leave them in their current space; it just positions them in that space.