Apptivate 용 AppleScript를 작성하여 Google 크롬에서 현재 Firefox 4 또는 Safari 탭을 열려고합니다. Safari 절이 작동하고 if 문이 Firefox로 들어가지만 URL을 복사하지는 않습니다. 여기Chrome에서 현재 Firefox 4 탭을 열려면 AppleScript로
내 AppleScript로이며 작동하지 않습니다
tell application "System Events"
set myApp to name of first application process whose frontmost is true
if myApp is "firefox-bin" then
tell application "Firefox" to set theURL to the «class curl» of frontmost of window 1
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "t" using {command down}
set URL of last tab of window 1 to theURL
end tell
else if myApp is "Safari" then
tell application "Safari" to set theURL to the URL in document 1
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "t" using {command down}
set URL of last tab of window 1 to theURL
end tell
end if
end tell
나는 무엇을 놓치고?