• 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: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari


  • Subject: Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 31 Mar 2017 18:19:39 +1100

On 31 Mar 2017, at 6:03 pm, Christopher Stone <email@hidden> wrote:

The XPath code in the Google link scraper has been working perfectly for over a year.

I don't think the XPath part is the problem. It looks to me that you can't return an array/list. This is what I'm seeing here:

Exception Name: NSInternalInconsistencyException
Description: Error while returning the result of a script command: the result object...
(
    "http://www....",
[...]
    "http://www...."
)
...could not be converted to an Apple event descriptor of type 'text | number | boolean | record'. 
This instance of the class '__NSArrayM' doesn't respond to -scriptingTextDescriptor messages.
This instance of the class '__NSArrayM' doesn't respond to -scriptingNumberDescriptor messages.
This instance of the class '__NSArrayM' doesn't respond to -scriptingBooleanDescriptor messages.
This instance of the class '__NSArrayM' doesn't respond to -scriptingRecordDescriptor messages.


So maybe you need to build a string to return.

Meanwhile you should log a bug; those are private methods, and presumably there should be a -scriptingListDescriptor method too. If they can return records, there's no reason they can't return lists.

Just don't hold your breath...

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>


 _______________________________________________
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: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
      • From: Christopher Stone <email@hidden>
References: 
 >Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Christopher Stone <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Takaaki Naganoya <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Christopher Stone <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Takaaki Naganoya <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Christopher Stone <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Takaaki Naganoya <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Christopher Stone <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: 2551phil <email@hidden>)
 >Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
  • Next by Date: Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
  • Previous by thread: Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
  • Next by thread: Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
  • Index(es):
    • Date
    • Thread