• 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: maths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: maths


  • Subject: Re: maths
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 18 Apr 2012 15:26:09 -0400

set totalUsage to get word 29 of topReport as number


On Apr 18, 2012, at 3:23 PM, Javi Pérez wrote:

Hello I have this 
set topReport to do shell script "top -n1 -l1"
set totalUsage to get word 29 of topReport

set totalUsage2 to 100 - totalUsage

and I see this 
error "No es posible convertir \"50.0\" en tipo number." number -1700 from "50.0" to number

not possible to convert 50.0 in type number


but it's already a number, I also tried to suffix "as number" in the set totalUsage line, but won't work. If I try manually set totalUsage2 to 100 - 50.2 it works

why?
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
  • Follow-Ups:
    • RE: maths
      • From: Javi Pérez <email@hidden>
References: 
 >maths (From: Javi Pérez <email@hidden>)

  • Prev by Date: maths
  • Next by Date: RE: maths
  • Previous by thread: maths
  • Next by thread: RE: maths
  • Index(es):
    • Date
    • Thread