• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script to clear Safari?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script to clear Safari?


  • Subject: Re: Script to clear Safari?
  • From: "Stockly, Ed" <email@hidden>
  • Date: Mon, 22 Feb 2016 21:06:50 +0000
  • Thread-topic: Script to clear Safari?

  
tell application "Safari"
close every window
end tell
 

The version I posted may have seen a bit convoluted, but it's fairly bulletproof. It closes regular windows (even those that display alerts when you try to close them) popup windows, and _javascript_ windows in safari.

A version ran unattended on a dozen macs 24 hours a day displaying a web pages from a pre-set list, cycling through every hour.

I have a current version runs with Google Chrome (the presentation mode look's better than Safari). I couldn't script the clear settings, due to Google's screwed up interface, but found an extension that clears the settings every time Google Chrome restarts.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Script to clear Safari? (From: email@hidden)
 >Re: Script to clear Safari? (From: "Stockly, Ed" <email@hidden>)
 >Re: Script to clear Safari? (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Script to clear Safari?
  • Next by Date: LaunchServices and Applescript
  • Previous by thread: Re: Script to clear Safari?
  • Next by thread: Re: Script to clear Safari?
  • Index(es):
    • Date
    • Thread