2012-08-21 6 views

답변

0

마지막으로 사용한 창에서 활성 탭의 URL을 가져 오려면 다음과 같이하십시오.

tell application "Safari" 
    set w to first window 
    set t to current tab of w 
    display dialog (URL of t as string) 
end tell 
0

tell application "Safari" to URL of document 1 앞면 창이 정상 브라우저 창이 아닌 경우에도 작동합니다.

Safari 6의 위치 표시 줄에있는 텍스트는 tell application "System Events" to tell process "Safari" to value of text field 1 of group 2 of tool bar 1 of window 1입니다.

관련 문제