• 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: UI scripting "Show Infos"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI scripting "Show Infos"


  • Subject: Re: UI scripting "Show Infos"
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 9 Jul 2006 10:38:18 +0200


Every attempts I made to use GUI scripting to select the icon button in the "Show infos" window (under Mac OS X 10.3.9) failed.

I was quite ready to leave the script when I remembered that pressing tab just after opening the window was doing the trick.
Bingo, now I have a working script:

tell application "Finder"
activate
open information window of (selection as alias)
tell application "System Events"
tell process "Finder"
tell window 1
keystroke tab -- select icon button
keystroke "vw" using command down -- paste + close window
end tell -- window 1
end tell -- process Finder
end tell -- application System Events
end tell -- Finder

I knew that keystroke is able to send a string but I discovered today that the given modifiers are applied to every character in the string so I was able to code paste and close in a single instruction.

I tried to put the tab in the same instruction (tab + cmd) does the same that (tab) but here it doesn't works.

Yvan KOENIG
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UI scripting "Show Infos"
      • From: kai <email@hidden>
References: 
 >UI scripting "Show Infos" (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Code referenced by variable runs but variable undefined
  • Next by Date: Re: Code referenced by variable runs but variable undefined
  • Previous by thread: UI scripting "Show Infos"
  • Next by thread: Re: UI scripting "Show Infos"
  • Index(es):
    • Date
    • Thread