safari – How do I modify an Applescript to select a menu?


There is a script that can import Google Chrome Bookmarks, History & Passwords to Safari. sync-from-chrome-to-safari

But the issue is that it will import all from Chrome to Safari. I liked to import only the selective ones. How do I do that?

    -- import history, bookmarks, passwords from google chrome to safari
tell application "System Events" to tell process "Safari"
    delay 0.5
    log "Syncing..."
    tell menu item "Import From" of menu "File" of menu bar item "File" of menu bar 1
        tell menu "Import From"
            click menu item "Google Chrome.app…"
        end tell
    end tell
    keystroke return
    log "Complete sync"
end tell

Something like this:

Author: Subham

Leave a Reply

Your email address will not be published. Required fields are marked *