• 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: text to dark pdf
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text to dark pdf


  • Subject: Re: text to dark pdf
  • From: "Stockly, Ed" <email@hidden>
  • Date: Tue, 06 Oct 2009 14:03:08 -0700
  • Thread-topic: text to dark pdf

>>>sorry, i don't know javascript. If someone can write it, then i can use it.
But i can't write it myself. I simply want to change the entire background color
to gray.


If you¹d prefer to do it without JavaScript, here¹s a pure AppleScript
method...

HTH,

ES
----------


set myText to "Hello World"
PlaceTextIntoNewWindow(myText)

on PlaceTextIntoNewWindow(myText)
    set HTMLheader to "<html>
<body bgcolor=\"#aaaaaa\">
<div id='text'>"
    set HTMLfooter to "</div>
</body>"
    set tempFolder to path to temporary items
    set tempDoc to (tempFolder as text) & "tempDoc"
    set tempDoc to POSIX path of tempDoc
    try
        set openFile to open for access tempDoc with write permission
    on error
        close access tempDoc
        set openFile to open for access tempDoc with write permission
    end try
    set eof of openFile to 1
    write HTMLheader & myText & HTMLfooter to openFile
    close access openFile
    tell application "Safari"
        open tempDoc
    end tell
end PlaceTextIntoNewWindow


>>>>>

 _______________________________________________
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

  • Follow-Ups:
    • Re: text to dark pdf
      • From: Rounak Jain <email@hidden>
References: 
 >Re: text to dark pdf (From: Timofey Danshin <email@hidden>)

  • Prev by Date: Re: Assigning keywords to a file without the use of Photoshop
  • Next by Date: script works when reading from DVD but not when reading from hard disk
  • Previous by thread: Re: text to dark pdf
  • Next by thread: Re: text to dark pdf
  • Index(es):
    • Date
    • Thread