Applescript + javascript = copy highlighted web text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jon

    #1

    Applescript + javascript = copy highlighted web text

    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,

    Jon@corporates. com
  • Joakim Braun

    #2
    Re: Applescript + javascript = copy highlighted web text

    "jon" <jon@corporates .com> skrev i meddelandet
    news:10103198.0 407131504.28e61 9e7@posting.goo gle.com...[color=blue]
    > 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,
    >
    > Jon@corporates. com[/color]

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

    Joakim Braun


    Comment

    Working...