Ok, so I saw a bunch of posts with alarms that went off and gave you info. I liked how it gave you readouts, so I made one without the alarm, just a big readout. Please comment any ideas that you have for it to give you info on, thanks a ton!
PS: Sorry if the applescript doesnt come out right or something, first post with applescript in it
-- You dont need this next line if you dont have snow leopard OS X
do shell script "killall SpeechRecognitionServer"
-- Sets the time
on thetime()
-- hours
set timeStr to time string of (current date)
set Pos to offset of ":" in timeStr
set theHour to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
-- minutes
set Pos to offset of ":" in timeStr
set theMin to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
return (theHour & ":" & theMin & "") as string
end thetime
-- Pauses yor music (add any other music apps you use to ensure its quiet)
tell application "iTunes"
pause
end tell
set TID to AppleScript's text item delimiters
-- Gets the temperature in fahrenheit and the current outlook (go to the site and search your location and use that url, but keep the curl in front)
try
set webaddress to do shell script "curl [url=http://i.wund.com/auto/iphone/PA/Oxford.html]http://i.wund.com/auto/iphone/PA/Oxford.html"[/url]
--Note: The following is not my code, I borrowed it from someone else, Im not good with using delimiters to split objects in html, I prefer to use offset to find a 'marker' I found in the html source for the website
set AppleScript's text item delimiters to "<span class=\"nowrap\"><b>"
set text1 to text item 3 of webaddress
set AppleScript's text item delimiters to "</b>"
set tempC to text item 1 of text1
set temp to (((9 / 5) * (tempC as number)) + 32) as string
set temp to round (temp)
--And the outlook for the day
set AppleScript's text item delimiters to "<div>"
set text2 to text item 3 of webaddress
set AppleScript's text item delimiters to "</div>"
set outlook to text item 1 of text2
set AppleScript's text item delimiters to TID
--The temperature is now stored as "temp" and the outlook as "outlook" insha'allah. If not:
on error
set outlook to "unknown"
set temp to "unknown"
end try
--DATE
set d to (date string of (current date))
-- Sets options for greetings
set d to (date string of (current date))
set theOptions to {"Hello!", "Hey Alex!", "Your information:", "Current news:", "Sup.", "Yo."}
set theChoice to some item of theOptions
say theChoice displaying theChoice with waiting until completion
delay 1
-- Day of week/time
say "Its " & word 1 of d
say "and its "
say thetime()
delay 1
--Says the outlook/temperature
say "The outlook for the weather in Oxford today is. " & outlook displaying "The outlook for the weather in Oxford today is. " & outlook with waiting until completion
delay 1
say "The current temperature is. " & temp
if temp is not equal to "unknown" then
say "degrees fahrenheit" displaying "degrees fahrenheit" with waiting until completion
end if
-- If you want, change the following to different temps depending on what you think is hot/cold
if temp is not equal to "unknown" then
if temp is greater than 85 then say "It's hot out side!"
if temp is less than or equal to 85 and temp is greater than 68 then say "It's warm out side."
if temp is less than or equal to 68 then say "It's cold out side!"
end if
delay 1
-- Lets you say a day and finds it on a website and gives you weather read out (see earlier section for info on how to change location)
tell application "SpeechRecognitionServer"
try
set themAnswer to listen for {"tomorrow", "tomorrow night", "monday", "monday night", "tuesday", "tuesday night", "wednesday", "wednesday night", "thursday", "thursday night", "friday", "friday night", "saturday", "saturday night", "sunday", "sunday night", "today", "now", "tonight", "this afternoon", "no", "no thank you", "im fine", "im good", "none"} with prompt "Wood u like to hear a detailed report for a day this week?" giving up after 30
-- Note: The only reason it says "wood u" is cause the voice sounded funny so i changed it to how it seems like you should spell "would you"
on error
say "No report found."
end try
end tell
if themAnswer is "now" then set themAnswer to ""
if themAnswer is "tomorrow" then
set cdow to word 1 of d
if cdow is "Monday" then set themAnswer to "Tuesday"
if cdow is "Tuesday" then set themAnswer to "Wednesday"
if cdow is "Wednesday" then set themAnswer to "Thursday"
if cdow is "Thursday" then set themAnswer to "Friday"
if cdow is "Friday" then set themAnswer to "Saturday"
if cdow is "Saturday" then set themAnswer to "Sunday"
if cdow is "Sunday" then set themAnswer to "Monday"
end if
if themAnswer is "tomorrow night" then
set cdow to word 1 of d
if cdow is "Monday" then set themAnswer to "Tuesday night"
if cdow is "Tuesday" then set themAnswer to "Wednesday night"
if cdow is "Wednesday" then set themAnswer to "Thursday night"
if cdow is "Thursday" then set themAnswer to "Friday night"
if cdow is "Friday" then set themAnswer to "Saturday night"
if cdow is "Saturday" then set themAnswer to "Sunday night"
if cdow is "Sunday" then set themAnswer to "Monday night"
end if
-- Reads the weather for a certain day out loud (see choices above)
if themAnswer is "no" or themAnswer is "no thank you" or themAnswer is "im fine" or themAnswer is "im good" or themAnswer is "none" then
say "Ok."
else
if themAnswer is "today" then set themAnswer to "this afternoon"
try
set theResponse to themAnswer & "</span><br />"
set text10 to offset of theResponse as string in webaddress
set todayF to text text10 thru end of webaddress
set thisAft to text ((offset of "<div>" in todayF) + 5) thru ((offset of "</div>" in todayF) - 1) of todayF
say thisAft displaying thisAft with waiting until completion
on error
say "I cant find a detailed report."
end try
end if
-- Reads the top article from business week (technology) aloud
try
set webaddress2 to do shell script "curl [url=http://www.businessweek.com/technology/]http://www.businessweek.com/technology/"[/url]
set text2end to text (offset of "<li class=\"first clearfix\">" in webaddress2) thru end of webaddress2
set text3end to text ((offset of "title=" in text2end) + 7) thru end of text2end
set text2 to text 1 thru ((offset of "\"" in text3end) - 1) of text3end
say "Latest tech: " & text2
on error
say "No tech found"
end try
-- Tells how many events you have today
tell (current date) to set today to its date string
set counter to 0
tell application "iCal"
set e_vent to every event in calendar "Personal"
repeat with i from 1 to number of items in e_vent
set this_item to item i of e_vent
set startdate to start date of this_item
--set starttime to start of this_item
set startdate to date string of startdate
if startdate is today then
set counter to counter + 1
end if
end repeat
end tell
if counter = 1 then
say "You have " & (counter as string) & " event today. It is:"
else
if counter = 0 then
say "You have no events today."
else
say "You have " & (counter as string) & " events today. They are:"
end if
end if
set oldCounter to counter
-- If you have events today, says them.
if not counter = 0 then
tell application "iCal"
set e_vent to every event in calendar "Personal"
repeat with i from 1 to number of items in e_vent
set this_item to item i of e_vent
set startdate to start date of this_item
--set starttime to start of this_item
set startdate to date string of startdate
if startdate is today then
set counter to (counter - 1)
if counter = 0 and not oldCounter = 1 then
say " and " & (get summary of this_item) & "."
else
if counter = 0 and oldCounter = 1 then
say (get summary of this_item) & "."
else
say (get summary of this_item) & ","
end if
end if
end if
end repeat
end tell
end if
-- List of possible salutations
set theOptions to {"Goodbye!", "Bye Alex!", "See ya!", "Have fun today!", "Bye!", "Adios!"}
set theChoice to some item of theOptions
delay 1
say theChoice displaying theChoice with waiting until completion
-- Sets the speech server up again for use (if you have the messed up snow leopard)
try
tell application "SpeechRecognitionServer"
listen for {} with prompt "" giving up after 1.0E-27
end tell
end try