Re: Sierra 10.12.4 and JavaScript by AppleEvents in Safari
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... ( [...] ) ...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...
|
_______________________________________________
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