Re: AppleScript-Users Digest, Vol 8, Issue 454
Re: AppleScript-Users Digest, Vol 8, Issue 454
- Subject: Re: AppleScript-Users Digest, Vol 8, Issue 454
- From: Emile Schwarz <email@hidden>
- Date: Mon, 10 Oct 2011 18:21:54 +0200
Le 09/10/11 21:00, email@hidden a écrit :
Date: Sat, 08 Oct 2011 23:39:31 +0100
From: Nigel Garvey<email@hidden>
Subject: Re: How do I set the focus to the Icon of the Information Window ?
To: AppleScript Users<email@hidden>
Message-ID:<email@hidden>
Content-Type: text/plain; charset=US-ASCII
Emile Schwarz wrote on Sat, 08 Oct 2011 12:36:02 +0200:
Hi,
Mac OS X 10.6.8
I used the AppleScript below to get the properties of the Get
Information window. I determined elsewhere that there is two UIelements
images.
tell application "System Events"
tell process "Finder"
-- Keyboard shortcut
set fw to front window
-- Give me some info
return {name of fw& return, properties of image 0 of fw}
end tell
end tell
I do the same for image 1 and compare the two results.
1. Why the two images size are 16 x 16 ?
One have to be larger (the folder icon)
The other is certainly the grow winfow icon.
The reference 'image 0 of fw' should throw an error, since 0 isn't a
valid index in AppleScript. But it doesn't error for some reason and
image 0 and image 1 are in fact the same image: ie. the image in the
window's title bar.
The image you need to select is the first one in the window's first
scroll area. Its size is 32 x 32:
tell application "System Events"
tell process "Finder"
set frontmost to true
-- Keyboard shortcut
set fw to front window
set focused of image 1 of scroll area 1 of fw to true
-- Give me some info
return {name of fw& return, properties of image 1 of scroll area 1 of fw}
end tell
end tell
NG
Thank you, I will try that,
Emile
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden