• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Formatting question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formatting question


  • Subject: Re: Formatting question
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 20 Apr 2007 10:02:37 -0400

On 4/20/07, Chris Waldrip <email@hidden> wrote:
- I'm trying to take a number entered by the user, and prefix it with
specific text depending on the size of that number.

There are OSAXen that make that easier, with printf-like capabilities, but OK.

 The
first problem is that, as run from Script Editor, it doesn't display
the actual value entered by the user (for me it's returning the
number 3 for some reason, ymmv).

The return value of "display dialog" is a record; asking for the "number of" a record tells you how many fields there are, in this case 3. What you want is the "text returned" field from the record, cast into a number:

set DNGnumber to text returned of result as number

--
Mark J. Reed <email@hidden>
_______________________________________________
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
References: 
 >Formatting question (From: Chris Waldrip <email@hidden>)

  • Prev by Date: Re: Formatting question
  • Next by Date: Re: Formatting question
  • Previous by thread: Re: Formatting question
  • Next by thread: Summary: Formatting question
  • Index(es):
    • Date
    • Thread