AppleScript dialog - display a number in a dialog

To display a number in an AppleScript dialog, just treat it like a string and it will work fine. Here’s an example using a literal number:

display dialog 4.79

And here’s an example using a numeric variable:

set myNum to 4.88
display dialog myNum

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.