1
iOCZ 275 天前
appscript gui
|
2
iOCZ 275 天前 1
tell application "System Events"
tell application process "Safari" tell menu bar 1 tell menu bar item "显示" tell menu 1 tell menu item "翻译" tell menu 1 #翻译为中文 if enabled of menu item 1 is true then tell menu item 1 click end tell #翻译为英文 else if enabled of menu item 2 is true then tell menu item 2 click end tell else #显示原始网页 if enabled of menu item 5 is true then tell menu item 5 click end tell end if end if end tell end tell end tell end tell end tell end tell end tell |