GUI scripting menu item with leading spaces
GUI scripting menu item with leading spaces
- Subject: GUI scripting menu item with leading spaces
- From: "Jim Clause" <email@hidden>
- Date: Thu, 10 May 2007 17:34:33 -0400
Does any one have an idea on how to use GUI scripting to click a menu
item with a leading space. I'm trying to access the Open Recent menu
of Preview but my script is failing. Other nested menus, like the
Finder's View -> Arrange By -> Name work fine.
I'm tried writing my own script and using the so_submenu script from
http://www.apple.com/applescript/uiscripting/03.html both fail.
Here's my attempt that fails:
tell application "Preview" to activate
tell application "System Events" to click menu item "bug.jpg" of menu
1 of menu item "Open Recent" of menu 1 of menu bar item "File" of menu
bar 1 of application process "Preview"
However if I change the reference for the menu item from menu item "
bug.jpg" to menu item 1 everything works. Unfortunately since the
Open Recent menu gets rearranged I can't rely on the items being in
the same place.
Thanks,
~Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden