AppleScript가 처음입니다. 나는 약간의 검색 및 읽기를 수행하고 메뉴 항목을 활성화하기위한 작업을하도록되어 뭔가를 발견했습니다AppleScript에서 Seamonkey의 메뉴 항목을 활성화하려고합니다.
tell application "SeaMonkey"
activate
end tell
tell application "System Events"
click menu item "Composer" of menu "Windows" of menu bar item "Windows" of menu bar 1 of process "SeaMonkey"
--> error number -1728 from «class mbri» "Windows" of «class mbar» 1 of «class prcs» "SeaMonkey"
end tell
결과 : 거짓 나는 이벤트 로그 창에 표시되는지 실행하면
on do_menu(app_name, menu_name, menu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
tell process app_name
tell menu bar 1
tell menu bar item menu_name
tell menu menu_name
click menu item menu_item
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
end do_menu
-- In my case I want to start Seamonkey and open the Composer window (and select it) so I
-- do:
do_menu("SeaMonkey", "Windows", "Composer")
을
내가 뭘 잘못하고 있는지 알지 못합니다.