DVD 플레이어 응용 프로그램을 시작한 후 작은 크기의 실제 크기로 크기를 조절하는 작은 AppleScript를 만들려고합니다. 코드는 다음과 같습니다. 코드를 실행하면 DVD 플레이어가 시작되지만 창 크기가 조정되지 않습니다. 이 기능을 사용하려면 무엇을 놓치고 있습니까?AppleScript : 응용 프로그램을 시작한 다음 메뉴 명령을 실행하는 방법
감사합니다, 롭
do_menu("DVD Player", "View", "Actual Size")
on do_menu(app_name, menu_name, menu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
delay 3
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
+1에 대한 제안입니다. –
메이슨 (Mason) - AppleScript 사전에 대한 도움과 지식에 감사드립니다. – calmcajun
안녕하세요. –