Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UI scripting "Show Infos"



Hello
here is a piece of code I grabbed from a script I’m working on.

As is, it assumes that a folder’s «Show infos» window is at front (Mac OS X 10.3.9)

I don’t understand what is wrong, the folder’s icon is NOT selected so the cut attempt don’t work.

--[SCRIPT]
 property theApp : "Finder"


tell application theApp activate my cutIcon() end tell

on cutIcon()
tell application theApp
-- activate
tell application "System Events"
tell process theApp
set nomFenetre to name of window 1 --perhaps temporary
tell window 1
select button "image" of UI element 6 of UI element 5 --of window nomFenetre
--keystroke "x" using command down
my selectMenu(4, 3)
end tell -- window 1
end tell -- process theApp
end tell -- application System Events
end tell -- application theApp
end cutIcon


 on selectMenu(mt, mi)
 tell application theApp
 -- activate
 tell application "System Events"
 tell process theApp
 click menu item mi of (menu mt of menu bar 1)
 end tell -- process theApp
 end tell -- application System Events
 end tell -- application theApp
 end selectMenu
--[/SCRIPT]

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


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.