Safari当前新的标签页+当前标签页首页

时间:2019-05-19 14:16:23

标签: macos safari tabs applescript

我使用了这些链接中的applescript:

https://daringfireball.net/2018/12/safari_new_tab_next_to_current_tab

这些applescript用于在Safari中打开当前活动标签旁边的新标签,问题是打开的新标签只是空白标签,而不是通常的带有书签的标签首页

有什么修改方法吗?

tell application "Safari"
    tell front window
        set _old_tab to current tab
        set _new_tab to make new tab at after _old_tab
        set current tab to _new_tab
    end tell
end tell

1 个答案:

答案 0 :(得分:0)

tell application "Safari"
    tell front window
        set _old_tab to current tab
        set _new_tab to make new tab at after _old_tab
        set current tab to _new_tab
        set URL of current tab to {"favorites://"}
    end tell
end tell