Re: Formatting Text When Responding to a Dialog Box
Re: Formatting Text When Responding to a Dialog Box
- Subject: Re: Formatting Text When Responding to a Dialog Box
- From: Luther Fuller <email@hidden>
- Date: Wed, 25 Jan 2012 13:41:21 -0600
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?
I haven't the slightest idea how to do that, but it was so interesting that I did a little experimenting. Here's something that may help ...
display dialog "Enter ..." default answer "street_address" & return & "city, state zip" default button 1 set response to text returned of the result display dialog response buttons {"OK"} default button 1
The 'default button 1' at the end of line 1 does not work as I expected. (Could be a bug?) But it does let you enter the data correctly!
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden