Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > AppleScript To Email Contents of A Website?

AppleScript To Email Contents of A Website?
Thread Tools
ncmason
Guest
Status:
Reply With Quote
Sep 23, 2007, 08:19 AM
 
Is there an AppleScript that will email the "contents" of a specified website?

Thanks,
Mason
     
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Sep 23, 2007, 12:21 PM
 
tell application "Safari" to email contents of front document
     
ncmason
Guest
Status:
Reply With Quote
Sep 23, 2007, 03:00 PM
 
Thanks for that, but that wasn't quite what I was looking for. I want to make an AppleScript that will email the contents from a website that I specify. Do you know of a way to do that? Sorry if this sounds confusing to you.

Mason
     
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Sep 23, 2007, 03:44 PM
 
Code:
property timeout_value : 60 tell application "Safari" make new document at the beginning of documents set the URL of the front document to "http://www.macnn.com" delay 2 if my page_loaded(timeout_value) then email contents of document 1 end if end tell on page_loaded(timeout_value) repeat with i from 1 to the timeout_value tell application "Safari" if (do JavaScript "document.readyState" in document 1) is "complete" then return true else if i is the timeout_value then return false else delay 1 end if end tell end repeat return false end page_loaded
     
ncmason
Guest
Status:
Reply With Quote
Sep 23, 2007, 03:49 PM
 
Sweet! Thanks for taking the time to make that. I appreciate it. Where would I put an email address for the contents of the site to be sent to?

Thanks Again,
Mason
     
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Sep 23, 2007, 06:36 PM
 
Originally Posted by ncmason View Post
Where would I put an email address for the contents of the site to be sent to?
Someone else needs to answer this, because I don't know. The apparent way of getting hold of the newly created e-mail via AppleScript doesn't work for me.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:40 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2