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: Christopher Stone <email@hidden>
- Date: Fri, 31 Mar 2017 21:06:45 -0500
On 03/31/2017, at 04:00, Jean-Christophe Helary <email@hidden> wrote:
Pretty cool this _javascript_ to AppleEvents thing. What do you usually use it for ?
I routinely scrape links and other stuff out of web pages.
A fairly trivial example would be the script I posted on the ASUL the other day:
Lookup Name from App-Page on MacUpdate.com in Downloads Folder with Spotlight
I used to do this sort of thing by parsing the source of the page with regular expressions using the Satimage.osax, but extracting specific data with _javascript_ can be much less prone to error.
Web programmers are much less likely to change class or id names than basic page structure.
|
_______________________________________________
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