PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Grab Selected Text From Webpage Using VB?-VBForums
Results 1 to 8 of 8

Thread: Grab Selected Text From Webpage Using VB?

  1. #1

    Thread Starter
    Lively Member _-Rs-_'s Avatar
    Join Date
    Aug 2009
    Posts
    84

    Question Grab Selected Text From Webpage Using VB?

    Hay All Thanks For All The Help In My Last Posts
    So This Time I Want To Learn How Grab Selected Text From Webpage
    Well I Did Search And I Got this http://www.vbforums.com/showthread.php?t=330341
    It Was Use full But i Did Not Understand Much Any Way
    I Made A Test Tool To See If I Can Grab Text I Used Document.Body.Innertext
    It Worked But My Problem It That It Grab's Everything In The Page Even Ads
    So What I Want Is That It Only Grab's What I Want Give Me A Good Example
    On How To Do It Please

  2. #2

    Thread Starter
    Lively Member _-Rs-_'s Avatar
    Join Date
    Aug 2009
    Posts
    84

    Re: Grab Selected Text From Webpage Using VB?

    Guys Is There A Way To No Hide Words Like In vb6

  3. #3

    Thread Starter
    Lively Member _-Rs-_'s Avatar
    Join Date
    Aug 2009
    Posts
    84

    Re: Grab Selected Text From Webpage Using VB?

    After Lot Of Search i Found Out That It Can Be Done With instr and mid function to parse out text So can Any One Give Me A Example Please Please Please

  4. #4

    Thread Starter
    Lively Member _-Rs-_'s Avatar
    Join Date
    Aug 2009
    Posts
    84

    Re: Grab Selected Text From Webpage Using VB?

    Guys Will Some One Please Reply

  5. #5
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: Grab Selected Text From Webpage Using VB?

    Bumping your thread every few hours is really not going to help you to get your answer any quicker. It will probably only annoy people and they will ignore you.

    Here's a small example.

    vb Code:
    1. Private Sub Command1_Click()
    2.     Dim strText As String
    3.     Dim x As Long, y As Long
    4.    
    5.     strText = "<tr><td class=""vbmenu_option""><a href=""group.php"">Grab Text</a></td></tr>"
    6.    
    7.     x = InStr(1, strText, "group.php"">")
    8.     If x Then
    9.         y = InStr(x, strText, "</a>")
    10.         If y Then
    11.             MsgBox Mid$(strText, x + 11, y - (x + 11))
    12.         End If
    13.     End If
    14.    
    15. End Sub

  6. #6

    Thread Starter
    Lively Member _-Rs-_'s Avatar
    Join Date
    Aug 2009
    Posts
    84

    Unhappy Re: Grab Selected Text From Webpage Using VB?

    Quote Originally Posted by Chris001 View Post
    Bumping your thread every few hours is really not going to help you to get your answer any quicker. It will probably only annoy people and they will ignore you.

    Here's a small example.

    vb Code:
    1. Private Sub Command1_Click()
    2.     Dim strText As String
    3.     Dim x As Long, y As Long
    4.    
    5.     strText = "<tr><td class=""vbmenu_option""><a href=""group.php"">Grab Text</a></td></tr>"
    6.    
    7.     x = InStr(1, strText, "group.php"">")
    8.     If x Then
    9.         y = InStr(x, strText, "</a>")
    10.         If y Then
    11.             MsgBox Mid$(strText, x + 11, y - (x + 11))
    12.         End If
    13.     End If
    14.    
    15. End Sub
    Sorry Bro I Did Not Mean To Bump I Was Jest Replying Any Way Thanks For The Info But I Don't Understand Any Thing In Your Code Can You Give Me
    A Example In More Detail With
    http://www.google.co.in/
    Last edited by _-Rs-_; Sep 10th, 2009 at 10:26 AM.

  7. #7
    Addicted Member ZenDisaster's Avatar
    Join Date
    Dec 2006
    Location
    Bay Area, CA
    Posts
    140

    Re: Grab Selected Text From Webpage Using VB?

    Try Doc.selection

    Code:
        Public Function GetSelection() As String
            GetSelection = CurrentDoc.selection.createRange().htmltext
        End Function
    Last edited by ZenDisaster; Sep 10th, 2009 at 10:28 PM.

  8. #8

    Thread Starter
    Lively Member _-Rs-_'s Avatar
    Join Date
    Aug 2009
    Posts
    84

    Re: Grab Selected Text From Webpage Using VB?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width