• 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: How do I format a number or Round a number?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I format a number or Round a number?


  • Subject: Re: How do I format a number or Round a number?
  • From: Steve Mills <email@hidden>
  • Date: Fri, 10 Oct 2003 12:20:57 -0500

On Friday, Oct 10, 2003, at 12:10 US/Central, Steve Mills wrote:

On Friday, Oct 10, 2003, at 11:49 US/Central, Work wrote:

I am trying to get Applescript to get the size of my Hard drive in a
display dialog. I use the get Free Space command and then divide by
1024/1024/1024 to get Gigabytes. The result is correct however the
number displays as "1.571773529053" I would like to display as a
rounded number. Maybe "1.57GB" Any help would be greatly appreciated.

(round (1.571773529053 * 100)) / 100

Or skip a few calculations:

tell application "Finder"
(round ((free space of disk "Gort") / 1.073742E+7)) / 100
end tell

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: How do I format a number or Round a number?
      • From: Walter Ian Kaye <email@hidden>
References: 
 >Re: How do I format a number or Round a number? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: How do I format a number or Round a number?
  • Next by Date: Re: Call an osax remotely?
  • Previous by thread: Re: How do I format a number or Round a number?
  • Next by thread: Re: How do I format a number or Round a number?
  • Index(es):
    • Date
    • Thread