Announcement

Collapse
No announcement yet.

Copying text from a URL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Copying text from a URL

    I assume this is easy to do if you know how to do it ...

    I would like to programatically open a specified URL in a browser, copy the page to the clipboard (ie simulate the Select All and Copy menu options), and then close the browser. Can someone please show me how to do this?

    Thanks

  • #2
    Should be easy to do with:

    SHELL ("C:\Program Files\Internet Explorer\IEXPLORE.EXE {your URL here}", 1)

    keybd_event.. (search the forum for examples) to send Ctrl-A, Ctrl-C, Alt-F4..

    CLIPBOARD GET TEXT TO sTemp (PBWin90) - to see what you got
    Rgds, Dave

    Comment


    • #3
      Hi James;

      Here's a primative code snippet that demonstrates that what you want to do is at least possible.

      Code:
        CLIPBOARD RESET TO test
        SHELL ("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.yahoo.com/", 1)
      ' Need to add some way to issue Ctrl-A and Ctrl-C programmatically here.
        CLIPBOARD GET ITEM %CF_TEXT TO test
        ?FORMAT$(test)

      Comment


      • #4
        Take a look at this:
        http://www.powerbasic.com/support/pb...trieve+WebPage

        http://www.powerbasic.com/support/pb...trieve+WebPage
        Francisco J Castanedo
        Software Developer
        Distribuidora 3HP, C.A.
        [URL]http://www.distribuidora3hp.com[/URL]

        Comment

        Working...
        X