Safariで開く(Google Chrome)

Google Chromeで開いているページをSafariで開くスクリプトです
現在のURLをSafariで開く
tell application "Google Chrome"
--activate
set theURL to get URL of active tab of window 1
end tell

tell application "Safari"
activate
make new document with properties {URL:theURL}
end tell
現在のURLをSafariで開く(新規タブ)
tell application "Google Chrome"
--activate
set theURL to get URL of active tab of window 1
end tell

tell application "Safari"
activate
if not (exists front window) then make new document
if (name of current tab of front window) is "スタートページ" then
set URL of current tab of front window to theURL
else
set curTab to make new tab of front window with properties {URL:theURL}
set current tab of front window to curTab
end if
end tell
全てのタブをSafariで開く
tell application "Google Chrome"
set urlList to get URL of every tab of window 1
end tell

tell application "Safari"
activate
make new document
repeat with theURL in urlList
if (name of current tab of front window) is "スタートページ" then
set URL of current tab of front window to theURL
else
make new tab of front window with properties {URL:theURL}
end if
end repeat
--set trgTab to count tabs of front window
--set current tab of front window to tab trgTab of front window
end tell

(*
tell application "Safari"
activate
set theWindow to make new document
tell theWindow
repeat with theURL in urlList
open location theURL
end repeat
end tell
end tell
*)

更新履歴

inserted by FC2 system