Re: CENTER window on Screen
Re: CENTER window on Screen
- Subject: Re: CENTER window on Screen
- From: Thierry Lavallée <email@hidden>
- Date: Thu, 17 Oct 2002 21:59:13 -0400
Thanks Michelle,
the final round of your solution looks very similar to what I received from
Ehsan Saffari which was great help. (You'll find in there how to determine
the screen size.)
>
>> tell application "Finder" to set otLmts to bounds of the content space of
>
>> desktop
>
tell application "FileMaker Pro"
>
set {a, b, c, d} to {item 1, item 2, item 3, item 4} of otLmts
>
set inLmts to bounds of window 1
>
set {w, x, y, z} to {item 1, item 2, item 3, item 4} of inLmts
>
set dest to {(c-(y-w))/2,(d-(z-x))/2,(y-w)+(c-(y-w))/2,(z-x)+(d-(z-x))/2}
>
activate
>
set bounds of window 1 to dest
>
end tell
The only missing thing is that the window is still hidden (frozen by Freeze
window script step) when the Filemaker script is calling the AS, which means
that the window is not indexed as 1 yet... And I would like to avoid the
flashing coming with moving a window across the screen. I would like this
window to appear right in the middle, the first time the user sees it. But I
guess I'll get a response for this by Ehsan (or someone who works FMP
files). Unless someone here got an idea about how to reach a frozen window).
thanks again!
--
Thierry
_______________________________________________
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.