【Apple Script】Safariブラウザのメニューから新規ウィンドウを開く

Safariブラウザのメニューから新規ウィンドウを開く

on onLoad()

    tell application "Safari" to activate
    tell application "System Events"
        tell process "Safari"
            set frontmost to true
            click menu item "新規ウインドウ" of menu "ファイル" of menu bar 1
        end tell
    end tell

end onLoad

メニューの項目にあれば、何でも呼べる

参考サイト