Finding the frontmost window in FrameMaker...
Finding the frontmost window in FrameMaker...
- Subject: Finding the frontmost window in FrameMaker...
- From: David Crowe <email@hidden>
- Date: Wed, 29 Jan 2003 15:56:32 -0700
FrameMaker does not respect the convention that "window 1" or
"document 1" is the frontmost. It orders them as they were opened
instead.
I stumbled across a workaround recently, based on the knowledge that
"the selection" is only associated with the frontmost document.
Here's a toy example that shows how to get from "the selection" to
the document by walking up the chain of "container of" until you fall
off the end (saving the last object, which is the document).
The setting of the bounds of the document is just to test out the concept.
- David Crowe
(*
* This shows how to set the bounds of the frontmost window in
FrameMaker. Not easy, but possible.
*)
tell application "FrameMaker 6.0"
activate
set TheObject to the selection
repeat
set SavedObject to TheObject
set TheObject to container of TheObject
try
TheObject -- Fails if it doesn't exist
on error
set TheBounds to (bounds of SavedObject)
display dialog "Bounds of " & (name of
SavedObject) & ": " & (item 1 of TheBounds) & "." & (item 2 of
TheBounds) & "." & (item 3 of TheBounds) & "." & (item 4 of
TheBounds) & "."
set (bounds of SavedObject) to {50, 200, 300, 600}
return
end try
end repeat
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.