• 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: Execute Javascript on an HTML file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Execute Javascript on an HTML file


  • Subject: Re: Execute Javascript on an HTML file
  • From: Emmanuel LEVY <email@hidden>
  • Date: Fri, 26 Apr 2013 19:17:54 +0200

Not fully understanding the question: your proposition "tell application Safari etc." looks perfect, what's wrong with it?

Best,
Emmanuel


On Apr 26, 2013, at 4:12 PM, Jim Skibbie wrote:

> I have a workflow where I'm pulling out the HTML source out of an email with:
>
> tell application "Microsoft Outlook"
> set theList to current messages
> set theMsgContent to content of item 1 of theList
> end tell
>
>
> The variable theMsgContent is an HTML file which has some formatted HTML tables in it with data. I would like to execute a chunk of Javascript on that HTML to parse out certain data out of it using something like:
>
> document.getElementsByTagName('td');
>
> Short of writing out the HTML file to disk and then opening it in Safari to perform a:
>
> tell application "Safari"
> set theResult to do JavaScript xyz in tab a
> end tell
>
>
> Is there a way to execute Javascript code on a file without involving the browser? Ideally, I'd like to do this with some resource that comes with a standard installation of OS software since this script will be distributed across multiple workstations and I don't want to have to maintain a certain environment for the script to be able to run.
>
> Thanks.
> _______________________________________________
> 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


 _______________________________________________
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

References: 
 >Execute Javascript on an HTML file (From: Jim Skibbie <email@hidden>)

  • Prev by Date: Execute Javascript on an HTML file
  • Next by Date: Re: Execute Javascript on an HTML file
  • Previous by thread: Execute Javascript on an HTML file
  • Next by thread: Re: Execute Javascript on an HTML file
  • Index(es):
    • Date
    • Thread