• 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: HTML and Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML and Applescript?


  • Subject: Re: HTML and Applescript?
  • From: Emmanuel <email@hidden>
  • Date: Sat, 6 Nov 2004 13:46:00 +0100

At 4:27 PM -0800 05/11/04, Vic Piercy wrote:
Anyone know if you can have Applescript create HTML. I would like to have an applescript create an HTML page. Has anyone tried this?

Some products that we market include a cgi-based help and remote-browsing system which generates loads of html from scratch.


Maybe, if you have to make more than a few pages by script, you might considering using the same framework as we do: we use Smile and its XML commands (a free environment). With XML you make xhtml (or some weaker xml-compatible form of html actually), and can use a DOM (document object model) on your page.

For instance the script below will load a pre-made page, suppress all table rows which include "admin" in their name, and return the html as text (utf-8, by default).

--------- untested
set themodelpage to alias "blah:blah"
set thexml to xmlroot xmlopen themodelpage
set theadminrows to xmlxpath thexml with "//tr[contains(@name, 'admin')]"
xmlremove theadminrows
set thepage to xmldisplayxml thexml
xmlclose thexml -- leak police might be watching
return thepage
------------------

More information on Smile at:
<http://www.satimage-software.com/en/smile.html>
and on the XML commands at:
<http://www.satimage-software.com/en/xml_suite.html>

Emmanuel
from Satimage-software, the authors of Smile.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >HTML and Applescript? (From: Vic Piercy <email@hidden>)

  • Prev by Date: Mail rule script interacting with FileMaker
  • Next by Date: Save a new file
  • Previous by thread: Re: HTML and Applescript?
  • Next by thread: Re: HTML and Applescript?
  • Index(es):
    • Date
    • Thread