Applescript + javascript = copy highlighted web text

J

jon

I have an Applescript that copies highlighted or selected webpage
text.

tell application "Internet Explorer"
set theWindowInfo to GetWindowInfo (item 1 of (ListWindows))
set theText to selected text
end tell

I am trying to have it "select all" webpage text then assign it to
theText to be used later. In other words, I need a way of selecting
all web page text of the open window so I can use it later. I am not
apposed to using javascript in an applescript. Does anyone have any
suggestions?

Thanks,

(e-mail address removed)
 
J

Joakim Braun

jon said:
I have an Applescript that copies highlighted or selected webpage
text.

tell application "Internet Explorer"
set theWindowInfo to GetWindowInfo (item 1 of (ListWindows))
set theText to selected text
end tell

I am trying to have it "select all" webpage text then assign it to
theText to be used later. In other words, I need a way of selecting
all web page text of the open window so I can use it later. I am not
apposed to using javascript in an applescript. Does anyone have any
suggestions?

Thanks,

(e-mail address removed)

In modern browsers you could walk the DOM tree with javascript and extract
most of the text on a page, I think.

Joakim Braun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top