• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: set position of window 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set position of window 1


  • Subject: Re: set position of window 1
  • From: Bill Briggs <email@hidden>
  • Date: Tue, 21 Mar 2006 16:21:16 -0400

At 12:59 PM -0700 3/21/06, Robert Poland wrote:
>with Tiger the following works but with Panther it fails. Is there an alternate command?
>
>tell application "GraphicConverter" to activate
>tell application "System Events" to tell process "GraphicConverter"
>	set frontmost to true
>	set position of window 1 to {(49), 44}
>end tell

Is there a reason you don't want to use the native ability in GC to position the window? I realize that it doesn't have a "position" defined in the dictionary, but it does have bounds, which can get you there with a couple of calculations. Does this work? I don't have a Panther Mac at hand to test it, but it should work.

tell application "GraphicConverter 4.4"
-- activate
set {a, b, c, d} to bounds of window 1
set {posA, posB} to {49, 44}  - could be user input
set bounds of window 1 to {posA, posB, (c - a) + posA, (d - b) + posB}
end tell

- web
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >set position of window 1 (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Run Script until User Action
  • Next by Date: Re: set position of window 1
  • Previous by thread: set position of window 1
  • Next by thread: Re: set position of window 1
  • Index(es):
    • Date
    • Thread