Just putting the final touches on a Movie Calendar script, that plays every Friday morning. I want to include it into my main morning script but just skip over it if its not Friday. I’ve been playing around with (currentweekday) but nothing has worked yet.
Movie Calendar is below… (Auto-refresh: Every Week) - Ignore Alerts
https://www.google.com/calendar/ical/pfutdblf1gi8jmfsvroh76f6jg%40group.calendar.google.com/public/basic.ics
set today to (current date)
set today's time to 0
set tomorrow to today + 7 * days
set myMovies to {}
set numberOfMovies to (count myMovies)
set movieHours to hours of (current date)
if movieHours is less than 10 then
set timeofDay to "Today"
else if movieHours is less than 14 then
set timeofDay to "This Afternoon"
else if movieHours is less than 18 then
set timeofDay to "This Evening"
else
set timeofDay to "Tonight"
end if
tell application "Calendar"
set futureMovies to every event of calendar "Movies" whose start date ≥ today and end date ≤ tomorrow
end tell
repeat with anEvent in futureMovies
tell application "Calendar" to set {summary:movieTitle, start date:theStartDate, allday event:theTimes, description:movieNotes, location:movieLocation} to anEvent
set movieSummary to summarize movieNotes in 1
set movieDay to (weekday of theStartDate)
set moviePlots to {", Here is a quick plot synopsis of the film.", ", Here is a little bit about the film.", ", Here is a short plot summary of the movie.", ", Let's take a look at the films synopsis.", ", Here's some details about the movie.", ", Here is some information about the movie."}
set moviePlot to some item of moviePlots
set theTimes to {"There is a movie entitled,", timeofDay & "You could go see,", "Showing" & timeofDay & ", is,", "You might want to see,", "There is a new film titled,", "Opening this " & movieDay & ", is,", timeofDay & "You might be interested in,", "Now showing,", "Now playing,", "Playing this " & movieDay & ", is,", "Playing " & timeofDay & ", is,"}
set theTime to some item of theTimes
set the end of myMovies to theTime & movieTitle & ", in." & movieLocation & moviePlot & " . " & movieSummary
end repeat
set numberOfMovies to (count myMovies)
if (numberOfMovies is less than 1) then
set firstGreetings to {"There are no new movies opening" & timeofDay, "I was unable to find any new movies opening this weekend.", "Looks like a slow weekend for Holywood. There is no new movies premiering" & timeofDay, "There is nothing new showing at the movie theater this weekend.", "You might want to watch something on Netflix" & timeofDay & ", there is nothing new at your local theater."}
set firstGreeting to some item of firstGreetings
say firstGreeting
else if (numberOfMovies is equal to 1) then
set secondGreetings to {"Here's a quick look at whats at the movies, " & timeofDay, "Let's see whats playing at the movie theaters this weekend., I have found one new movie opening " & movieDay, "Here's what is being released this weekend at the movies.", "There is one new movie premiering.", "Who's up for a movie this " & movieDay}
set secondGreeting to some item of secondGreetings
say secondGreeting
delay 1
say item 1 of myMovies
else
set thirdGreetings to {"I've found" & numberOfMovies & "new movies you might be interested in seeing this " & movieDay, "There are" & numberOfMovies & " new movies opening this weekend.", "Now showing at a movie theater near you!..." & numberOfMovies & "new movies have just been released" & timeofDay, "I have found " & numberOfMovies & " movies opening" & timeofDay, "Here is a look at whats playing " & movieDay & " at the movie theater.", "Who's up for a movie, " & timeofDay & "There are " & numberOfMovies & "new releases."}
set thirdGreeting to some item of thirdGreetings
say thirdGreeting
delay 1
repeat with thismovie in myMovies
say thismovie
delay 0.6
end repeat
end if
if (numberOfMovies ≥ 1) then
say "Check online for" & timeofDay & "'s showtimes, trailers, movie reviews & tickets."
set theURL to "http://trailers.apple.com/trailers/showtimes/"
tell application "Safari"
activate
try
tell window 1 to set current tab to make new tab with properties {URL:theURL}
on error
open location theURL
end try
end tell
end if