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