• 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
Example of script that moves window...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Example of script that moves window...


  • Subject: Example of script that moves window...
  • From: David Crowe <email@hidden>
  • Date: Thu, 17 Oct 2002 20:49:34 -0600

The following script moves a window a small distance to the right. It can easily be modified to center a window instead. I use this within QuicKeys, but other methods are possible. Note that you will have to use something like "set {minX, minY, MaxX, MaxY} to the bounds of item 1 of (screen list)" to get the bounds of the monitor to do the maths to center the window.

- David Crowe

property DCroweUtilities : (load script file ":System Folder:Scripts:DCroweUtilities")

tell DCroweUtilities
set TheBounds to GetFrontmostWindowBounds()
set theLeft of TheBounds to (theLeft of TheBounds) + 50
set theRight of TheBounds to (theRight of TheBounds) + 50
SetFrontmostWindowBounds(TheBounds)
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.

  • Prev by Date: Re: Attaching Outlook Express through FileMaker Pro
  • Next by Date: Center window on screen
  • Previous by thread: Re: Attaching Outlook Express through FileMaker Pro
  • Next by thread: OS X : ISO 8859-1 <=> MacRoman
  • Index(es):
    • Date
    • Thread