Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

derekshull

macrumors newbie
Original poster
May 7, 2012
9
0
So I have this really long script and I'm using dragon dictate to trigger the script to activate and the script says good morning and tells me the weather, reads me any new emails, tells me my agenda for today, reads me news headlines from specific rss feeds, and tells me the current time. I'm using a revolabs usb mic to do it and was wondering if there was a way to say "abort" or some other trigger word to stop the computer from mid way through?

It'd be quite helpful.
 

derekshull

macrumors newbie
Original poster
May 7, 2012
9
0
Heres the script:

Code:
tell application "Mail"
	
	set unreadMessages to (get every message of mailbox "INBOX" of account "Gmail" whose read status is false)
	
	set numberofmessages to (count of (every message of mailbox "INBOX" of account "Gmail" whose read status is false))
	
	if (count of (every message of mailbox "INBOX" of account "Gmail" whose read status is false)) is 1 then
		tell application "Mail"
			say "There is only " & numberofmessages & " new email"
			repeat with eachMessage in unreadMessages
				delay 1
				say "From! "
				say (get sender of eachMessage)
				say "Subject."
				say (get subject of eachMessage)
				say "Message."
				say (get content of eachMessage)
				set read status of eachMessage to true
			end repeat
		end tell
	else if (count of (every message of mailbox "INBOX" of account "Gmail" whose read status is false)) is greater than 1 then
		tell application "Mail"
			say "There are " & numberofmessages & " new messages"
			repeat with eachMessage in unreadMessages
				delay 1
				say "From! "
				say (get sender of eachMessage)
				say "Subject."
				say (get subject of eachMessage)
				say "Message."
				say (get content of eachMessage)
				set read status of eachMessage to true
			end repeat
		end tell
	else
		say "There are no new messages"
	end if
end tell

when I say "read my emails" it reads them to me. What I want is to be able to say "abort" and it'll immediately stop reading me my emails.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.