- 2008-02-25 ( 月 )
- [ サンプル ] その他アプリ
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 tell
Safari で開いているページを 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
参考にさせてもらったページ
- MACFreak
- macosxhints.com – Save selected browser text via AppleScript
- macosxhints.com – Fully automated, one-step sending of a URL from Safari
- Firefox 版アンカータグを作成する AppleScript
鳥獣保護区 | Firefox で開いているページを Safari で開く で紹介されている、拡張機能 + JavaScript を使った方法もあるみたい。
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://applescript.bowz.info/1327/trackback
- Listed below are links to weblogs that reference
- [ AppleScript ] Firefox で開いているページを Safari で開く from AppleScript 文法・サンプル集