• 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: AppleScript In Web Publishing...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript In Web Publishing...


  • Subject: Re: AppleScript In Web Publishing...
  • From: Martin Orpen <email@hidden>
  • Date: Mon, 5 Mar 2007 14:29:51 +0000

On 5 Mar 2007, at 12:49, Peter Bunn wrote:

A 'simple' example of what I'm asking about
would be a Google News page... no, not the search aspects of it, but the
formatting of the page, and the placement of images and stories.

Wouldn't the formatting be better handled using CSS?

All you need to do is generate the vanilla page content with the correct tags and let the style sheet handle the placement. A quick example:


property theHeader : "<html> <head> <title>AS_CSS</title> <style> @import \"http://homepage.mac.com/g33kthug/filechute/pos_guide.css\";; </style> </head>"

property theBody : "<DIV ID=container>
<P><SPAN ID=w01>This</SPAN>
<SPAN ID=w02>line</SPAN>
<SPAN ID=w03>has</SPAN>
<SPAN ID=w04>exactly</SPAN>
<SPAN ID=w05>six</SPAN>
<SPAN ID=w06>words</SPAN>
</DIV>
<body>"

property theFooter : "</body>
</html>"

set h to theHeader & theBody & theFooter
set foo to writeFile(h, "AS_CSS.html")

on writeFile(fD, fN)
set t to path to desktop
set posixT to POSIX path of t
set f to open for access file ((t as string) & fN) with write permission
write fD to f
close access f
end writeFile




--
Martin Orpen
<http://www.idea-digital.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
References: 
 >AppleScript In Web Publishing... (From: Peter Bunn <email@hidden>)

  • Prev by Date: Re: AppleScript In Web Publishing...
  • Next by Date: Re: AppleScript In Web Publishing...
  • Previous by thread: Re: AppleScript In Web Publishing...
  • Next by thread: Re: AppleScript In Web Publishing...
  • Index(es):
    • Date
    • Thread