如何使用Applescript获取菜单项列表?

cwd*_*cwd 8 macos applescript

有没有什么办法让标题就像一个菜单下的所有菜单项的列表FileEdit使用AppleScript?

我找到了一些相关的问题,但没有一点确切.谷歌也没有运气.

我正在尝试获取在Photoshop Window菜单中打开哪些文件的列表,并确定哪个文件具有复选标记.

screenshot-with-shadow.png http://img33.imageshack.us/img33/4526/screenshotwithshadow.png

我想我可以通过使用类似" 在Applescript中,我怎样才能知道菜单项是否被选中/聚焦? "和辅助功能检查器来完成第二部分.AXMenuItemMarkChar

screenshot-with-shadow.png http://img99.imageshack.us/img99/4526/screenshotwithshadow.png

ada*_*one 10

我没有Photoshop,但这适用于Illustrator:

activate application "Adobe Illustrator"
tell application "System Events"
    tell process "Adobe Illustrator CS5.1"
        set xxx to name of every menu item of menu 1 of menu bar item "Window" of menu bar 1
    end tell
end tell
Run Code Online (Sandbox Code Playgroud)

要获取可以使用的属性:

activate application "Adobe Illustrator"
tell application "System Events"
    tell process "Adobe Illustrator CS5.1"
        set xxx to value of attribute "AXMenuItemMarkChar" of menu item "tools" of menu 1 of menu bar item "Window" of menu bar 1
    end tell
end tell
Run Code Online (Sandbox Code Playgroud)

零场景:

activate application "Adobe Illustrator"
tell application "System Events"
    tell process "Adobe Illustrator CS5.1"
        set xxx to value of attribute "AXMenuItemMarkChar" of menu item "Brushes" of menu 1 of menu bar item "Window" of menu bar 1
        try
            xxx
        on error
            -- insert your code
            beep 2
        end try
    end tell
end tell
Run Code Online (Sandbox Code Playgroud)