How to get result to remember multiple text results
Im trying to make an application that will alternate between different messages depending on the user in put on how many different messages and the text in the message. I keep coming across the problem that the text returned is the last message entered, anyway to get every message entered displayed?
Thanks for your help!
This is the code I have for it.
tell application "System Events"
set textToSay to "Sample Text"
set ETM to "Enter The Message(s) You Wish to Send."
display dialog "Welcome
"
set question to "How Many Messages Would You Like to Display?"
set numberofmessagess to text returned of (display dialogquestiondefault answer "1")
repeat numberofmessages times
set textToSay to the text returned of (display dialogETMdefault answer "Click to type")
end repeat
display dialog "Interval " default answer ".05"
set int to the text returned of the result
set numoftimes to text returned of (display dialog "How many messages?" default answer "400")
display dialog "Click to launch in 3 Seconds"
delay 3
repeat numoftimes times
delayint
keystroketextToSay
keystrokereturn
end repeat
end tell
MacBook Pro, macOS Sierra (10.12.6)