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: UI scripting "Show Infos"




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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

References: 
 >UI scripting "Show Infos" (From: Yvan KOENIG <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.