Apptivate用のAppleScriptを書いて、現在のFirefox 4またはSafariタブをGoogle Chromeで開くことを試みています。 Safariのセクションが動作し、if文がFirefoxに入りますが、URLはコピーされません。ここでGoogle 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
私は何をしないのですか?