Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to create responses' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to create responses
Authored by: lewisi on Jul 31, '06 05:32:08PM

is there any way to make the responses random?



[ Reply to This | # ]
How to create responses
Authored by: mark hunte on Aug 16, '06 10:09:09AM
Try This.

property random : {}
property Last_random : {}
on run
	try
		tell application "System Events"
			set full_name to full name of current user as string
			set first_name to first word of full_name as string
		end tell
		set greet_1 to "Hello " & first_name & ", hey,   whats up?"
		set greet_2 to first_name & ", Hello " & ", hey,   whats up?"
		set greet_3 to "Hey,   whats up?" & first_name
		set greet_4 to "Hello ,, Me Olda Muckare"
		set greeting_list to {greet_1, greet_2, greet_3, greet_4}
		repeat until random is not Last_random
			set random to random number from 1 to count of items in greeting_list
		end repeat
		set Last_random to random
		say item random of greeting_list
	end try
end run

---
mh

[ Reply to This | # ]