Re: Web text to word
Re: Web text to word
- Subject: Re: Web text to word
- From: kai <email@hidden>
- Date: Wed, 16 Nov 2005 17:00:40 +0000
On 16 Nov 2005, at 04:07, dor kelman wrote:
Hello, I am new to applescript. I have tried reading how to do this
but I
cant figure it out. I want to copy all the text in my current
safari web
page and put it into ms word. So far all I have is:
Tell application "Safari"
Open location "http://news.google.com"
--here I need to copy the text
End tell
Hopefully we're talking about Word 2004 here, dor - in which case
something like this might do the trick:
----------------
on SafariText(l)
tell application "Safari" to tell document 1
open location l
tell URL to repeat until (exists) and it is l
delay 0.5
end repeat
its text
end tell
end SafariText
tell application "Microsoft Word"
activate
tell (make new document) to set text object's content ¬
to my SafariText("http://news.google.com/")
end tell
----------------
(Note the "/" at the end of the URL, which is needed for this
approach to work.)
---
kai
_______________________________________________
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