Search code examples
google-chromeapplescript

applescripts to open all sites in bookmark folder in chrome


New to applescripts trying to open all sites of a bookmark folder in a new Chrome window using applescripts.

This is what I have so far

tell application "Google Chrome"
    make new (window)
    activate "bookmark bar"
    open bookmark folder "Start My Day" of bookmark folder "My Day" of "bookmark bar"
end tell

Solution

  • Good start...

    tell application "Google Chrome"
        if not (exists window 1) then reopen
        set myBMFolder to bookmark folder "Start My Day" of bookmark folder "My Day" of bookmark folder "Bookmarks Bar"
        set bmURLs to URL of bookmark items of myBMFolder
        repeat with aUrl in bmURLs
            open location aUrl
        end repeat
    end tell