Thursday, July 4, 2024

Applescript to pick out safari import choices

This applescript automates the method of importing chrome bookmarks, historical past & passwords to safari. However, I prefer to skip the password. How can I try this? Right here is the script:

    -- shut google chrome to carry out importing 
do shell script "killall "Google Chrome" || echo "Google Chrome shouldn't be operating.""

do shell script "killall Safari || echo "Safari shouldn't be operating.""
inform utility "Safari" to activate

inform utility "System Occasions" to set seen of utility course of "Safari" to false

-- import historical past, bookmarks, passwords from google chrome to safari
inform utility "System Occasions" to inform course of "Safari"
    delay 0.5
    log "Syncing..."
    inform menu merchandise "Import From" of menu "File" of menu bar merchandise "File" of menu bar 1
        inform menu "Import From"
            click on menu merchandise "Google Chrome.app…"
        finish inform
    finish inform
    keystroke return
    log "Full sync"
finish inform

-- shut safari
do shell script "killall Safari || echo "Safari shouldn't be operating.""

-- restore chrome closed tabs and decrease window in background
delay 0.5
log "Opening chrome in background"
do shell script "open -a "Google Chrome" --args --restore-last-session --no-startup-window"

Any assist will probably be extremely appreciated. The purpose of importing all of the historical past to safari is that I can hold all my looking historical past in safari. And I can entry them additionally from my cellphone.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles