Mailing Lists: Apple Mailing Lists

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

Contextual Menu items using System Events



How do I get System Events to select an item on a contextual menu? 

UI Element Inspector showed me the AXShowMenu action to get the menu for an Image UI Element in Mail. The result is a new "Menu" item in the Text Area, according to UI Element Inspector. But I can't see it with my script, so I can't press any of it's Menu Items.

Am I doing something wrong?

- John R

tell application "Mail" to activate
tell application "System Events" to tell process "Mail"
tell window 1
tell scroll area 1
tell text area 1
tell image 1
perform action "AXShowMenu" --> Menu comes up fine.
end tell
delay 3 --> Just in case it's a timing thing.
return menus --> None, even though UI Element Inspector sees it.
end tell
end tell
end tell
end tell
 _______________________________________________
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.