• 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: Previous APOD Page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Previous APOD Page


  • Subject: Re: Previous APOD Page
  • From: Jon Pugh <email@hidden>
  • Date: Mon, 27 Aug 2012 20:50:11 -0700

On Aug 27, 2012, at 6:06 PM, Christopher Stone wrote:
> Like many people I enjoy the APOD, and also like many people I often forget to visit it daily.

I don’t forget.  Every morning, I run this script every morning via a DragThing button dock that appears in Safari.  I could do it automatically, but I prefer to do it on demand.

Jon


-- Morning Reading --
property bestBounds : {1, 22, 1181, 1198} -- choose your size here
property dontResize : {"Downloads", "General", "Appearance", "Bookmarks", "Tabs", "AutoFill", "Security", "Advanced"}

set currentDate to current date
set currentDay to weekday of currentDate
set isWinter to month of currentDate is in {November, December, January, February, March, April}
tell application "Safari"
	close windows
end tell
showURL("http://mac.alltop.com/";)
if isWinter then
	showURL("http://www.seanet.com/~jonpugh/SkiSummary.html";)
end if
showURL("http://antwrp.gsfc.nasa.gov/apod/astropix.html";)
if currentDay is Monday then
	showURL("http://www.oglaf.com/“) -- VERY NSFW, but damned funny
end if
if currentDay is in {Monday, Wednesday, Saturday} then
	showURL("http://www.giantitp.com/";)
end if
if currentDay is in {Monday, Thursday} then
	showURL("http://www.erfworld.com/";)
end if
if currentDay is in {Tuesday, Thursday, Saturday} then
	showURL("http://www.amazingagentjennifer.com/";)
end if
showURL("http://www.doonesbury.com/";)
showURL("http://www.gocomics.com/calvinandhobbes";)
showURL("http://www.gocomics.com/getfuzzy";)
showURL("http://www.gocomics.com/pearlsbeforeswine/";)
showURL("http://www.gocomics.com/nonsequitur/";)
showURL("http://dilbert.com/fast";)
if currentDay is Sunday then
	showURL("http://www.foxtrot.com/";)
end if
if currentDay is Monday then
	showURL("http://www.gocomics.com/tomthedancingbug/";)
end if
if currentDay is in {Tuesday, Thursday} then
	showURL("http://trenchescomic.com/";)
end if
showURL("http://www.penny-arcade.com/comic/";)
showURL("http://www.schlockmercenary.com/";)
if currentDay ≠ Saturday and currentDay ≠ Sunday then
	showURL("http://www.reallifecomics.com/";)
	showURL("http://wapsisquare.com/";)
	--	showURL("http://www.crazyapplerumors.com/";)
	--	showURL("http://www.macfixit.com/";)
	--	showURL("http://www.macintouch.com/";)
end if
tell application "DragThing"
	set minimised of dock "Safari" to true
end tell


on showURL(u)
	tell application "Safari"
		make new document at end of documents with properties {URL:u}
		set bounds of window 1 to bestBounds
	end tell
end showURL


 _______________________________________________
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


  • Follow-Ups:
    • Re: Previous APOD Page
      • From: Shane Stanley <email@hidden>
References: 
 >Previous APOD Page (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 9, Issue 331
  • Next by Date: Re: Previous APOD Page
  • Previous by thread: Resize APOD Page
  • Next by thread: Re: Previous APOD Page
  • Index(es):
    • Date
    • Thread