> On Jan 25, 2012, at 12:12 PM, Robert W. Young wrote:
> When I run the following script:
>
> tell application "Finder"
> set theText to text returned of (display dialog "What address do you want to display?" default answer "")
> display dialog theText
> end tell
>
> I would like to see the text displayed as:
> 1234 Oak Street
> Some City, Some State 12345
>
>
Using the 'Return' when inputting the text closes the dialog window
rather than starting a new line. Doing it in 2 segments "What is the
street address?" and "What are the city,
> state and zip?" is not
practical for what I am doing. Is it possible to do what I want, and if
so how?
Thanks to Barry Wainwright who responded to me directly the solution is
extremely simple and works perfectly. Modifying the above script by
simply using 'return' as the default answer allows the entry of multiple
lines of text, and when displayed later it appears exactly as it was
entered.
tell application "Finder"
set theText to text returned of (display dialog "What address do you want to display?" default answer return)
display dialog theText
end tell
What a simple fix for something that was driving me crazy. Thanks Barry!
Regards,
Bob