• 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: How do I set the focus to the Icon of the Information Window ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I set the focus to the Icon of the Information Window ?


  • Subject: Re: How do I set the focus to the Icon of the Information Window ?
  • From: Emile Schwarz <email@hidden>
  • Date: Mon, 10 Oct 2011 18:27:42 +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
How one will know that (s)he have to write that:

	set focused of image 1 of scroll area 1 of fw to true


image 1 of scroll area ????

Even if I become 'clearvoyant', I would never saw that ;-)

Thanks again Nigel,

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
  • Follow-Ups:
    • Re: How do I set the focus to the Icon of the Information Window ?
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: AppleScript-Users Digest, Vol 8, Issue 454
  • Next by Date: Run As Root
  • Previous by thread: Re: How do I set the focus to the Icon of the Information Window ?
  • Next by thread: Re: How do I set the focus to the Icon of the Information Window ?
  • Index(es):
    • Date
    • Thread