Advertisement
Nico-Salamone

Open Safari in private browsing

May 6th, 2020
3,062
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/osascript
  2.  
  3. set safariRunning to true
  4. if application "Safari" is not running then
  5.     set safariRunning to false
  6. end if
  7.  
  8. tell application "Safari"
  9.     if safariRunning = false then
  10.         delay 0.1
  11.         tell application "Safari" to close window 1
  12.     end if
  13.    
  14.     make new document
  15.     activate
  16.    
  17.     tell application "System Events"
  18.         keystroke "W" using {command down}
  19.         keystroke "N" using {shift down, command down}
  20.     end tell
  21. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement