Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Location and size of display window.



On 2006-09-20, at 12:52:10, Ruby Madraswala wrote:

Can I set location or size of other windows? Ex. in illustrator can I set location and size, then open a file or open a file and then set location and size?

Hi Ruby,

The following shows how to access every kind of window that is available (and visible) and set its location and size:

tell application "System Events"
	set anames to name of every application process whose visible is true
	repeat with a in anames
		tell process a
			set wcount to count of windows
			if (wcount > 0) then
				repeat with w from 1 to wcount
					tell window w
						set position to {0, 22}
						set size to {360, 360}
					end tell
				end repeat
			end if
		end tell
	end repeat
end tell



Philip Aker
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >RE: Location and size of display window. (From: "Ruby Madraswala" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.