
AppleScript を使って Firefox から URL を取得する方法が見つかったので、Firefox で開いているページを Safari で開くアップルスクリプトを書いてみた。
Firefox で開いているページを Safari で開く AppleScript
«class curl» を使うと Firefox から URL を取得できるんだが、何故取得できているのか調べてみたけど解らなかった。うーん。
tell application "Firefox" set theURL to «class curl» of window 1
end tell
tell application "Safari" activate open location theURL
end tellSafari で開いているページを Firefox で開く AppleScript
ついでに Safari で開いているページを Firefox で開くアップルスクリプトを書いてみた。
tell application "Safari" set theURL to (get URL of document 1)
end tell
set the clipboard to theURL
tell application "Firefox" to activate
tell application "System Events" to keystroke "t" using {command down}
tell application "System Events" to keystroke "v" using {command down}
tell application "System Events" to keystroke return参考にさせてもらったページ
macosxhints.com – Save selected browser text via AppleScript
macosxhints.com – Fully automated, one-step sending of a URL from Safari
鳥獣保護区 | Firefox で開いているページを Safari で開く で紹介されている、拡張機能 + JavaScript を使った方法もあるみたい。
現場からは以上です。それでは、またッ!!!


