• 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: Nigel Garvey <email@hidden>
  • Date: Sat, 08 Oct 2011 23:39:31 +0100

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

 _______________________________________________
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

  • Prev by Date: How do I set the focus to the Icon of the Information Window ?
  • Next by Date: Reading IPTC and EXIF information from photos
  • Previous by thread: 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