• 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
"first element whose" in Javascript for Automation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"first element whose" in Javascript for Automation


  • Subject: "first element whose" in Javascript for Automation
  • From: Deivy Petrescu <email@hidden>
  • Date: Sat, 24 Jan 2015 11:16:34 -0500

I am writing this question to the list, but this is certainly a question for David! ;-}
I don’t mind if someone else can answer, though!

I am working on a JSA  script for Numbers, replicating a working script in AS.
I am able to get an array of cells of a certain row.
Now I want to get the address of the first row whose values is null (missing value in AS)

Say the array name is  AllrowCells.

AllrowCells.whose({value:null)}    does not seem to work.
—> TypeError: undefined is not a function (evaluating 'Allrowcells.whose({value:null})')

I changed  “value”  and used other properties, still no go.
Also use other methods suggested in the JSA  RN and, I then tried the literal copy of the JSA RN and use both someElementAllrowCells.whose() and firstElementAllrowCells.whose() (yep, I know, but when you are desperate reason goes down the drain)

Here are the properties of a particular cell:

{"verticalAlignment":"top", "row":Application("Numbers").documents.byId("BA596B39-A416-410C-9E8E-B065DF650640").sheets.at(0).tables.at(0).rows.byName(" John"), "pcls":"cell", "fontName":"HelveticaNeue", "formattedValue":null, "backgroundColor":{"red":0.7529411911964417, "green":0.9293965101242065, "blue":0.9960784316062927}, "formula":null, "name":"K2", "textWrap":false, "textColor":{"red":0, "green":0, "blue":0}, "alignment":"auto align", "column":Application("Numbers").documents.byId("BA596B39-A416-410C-9E8E-B065DF650640").sheets.at(0).tables.at(0).columns.byName("1/30"), "format":"automatic", "fontSize":10, "value":null}


Deivy Petrescu
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


  • Follow-Ups:
    • Re: "first element whose" in Javascript for Automation
      • From: David Steinberg <email@hidden>
  • Prev by Date: Re: Labels and tags ?
  • Next by Date: Re: Using Log with Smile
  • Previous by thread: Re: Differences between commands in AppleScript editor and commands drop-down from tools menue from within Dragon Dictate
  • Next by thread: Re: "first element whose" in Javascript for Automation
  • Index(es):
    • Date
    • Thread