私は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
属性を取得するには、次を使用できます。
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
nilシナリオ:
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