Results 1 to 13 of 13

Thread: Click a link on IE browers

  1. #1

    Thread Starter
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83

    Click a link on IE browers

    Hi, I was wondering how would I be able to click a link on IE?
    Julie Luvs


  2. #2
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Use the mouse point on the link and click left mouse button

    Beat you all


    No but seriously....
    Couldnt you just goto the URL instead of loading the original page.

    What is it you are actually doing
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  3. #3

    Thread Starter
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83
    well, yes i can do that, but im trying to make it clicks all IE browers thats open


    any ideas how?
    Julie Luvs


  4. #4
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Sorry but this sounds suspicious

    WHAT????


    Why????
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  5. #5

    Thread Starter
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83
    suspicious?
    hm.. ok

    if you not going to help, there no need for your disrespectful comments, please let someone else reply. thank you
    Last edited by Julie_Luvs; May 26th, 2004 at 02:50 AM.
    Julie Luvs


  6. #6
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176


    What i mean is it sounds like one of those annoying ads that forwards all the browsers to some unknown and unwanted page.

    Is it a specific link? or any link on the page?
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  7. #7

    Thread Starter
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83
    it's a link on a page on a forum im an editor of
    Julie Luvs


  8. #8
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    So why cant you just go off the url.


    The only other way is to use the INET control to download the page and find the url in the text received from the webpage. Then forward to that address
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  9. #9
    Addicted Member
    Join Date
    May 2004
    Location
    China
    Posts
    228
    WHAT????

    Why????
    First things to go through my head as well... You could try enumerating through all windows/controls, and sending an API message to click on the link you need. But, BodwadUK's idea is much easier.

  10. #10
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    No. no, this is much easier... I used this code in one of my IE plug-ins. I've modified it, so now all instances of IE navigate to www.vbforums.com. Not sure if that is what you want, since every IE window is affected by this code... Also, this code does not click a link, it navigates to one. If you really need the clicking, let me know.
    VB Code:
    1. Dim objWindows As Object, objIE As Object
    2.  
    3. Set objWindows = CreateObject("Shell.Application").windows
    4.  
    5. If objWindows.Count > 0 Then 'Make sure there are windows
    6.     For Each objIE In objWindows
    7.         If InStr(1, objIE.FullName, "IEXPLORE.EXE", vbTextCompare) <> 0 Then 'IE instead of Windows Explorer
    8.             objIE.Navigate "http://www.vbforums.com"
    9.         End If
    10.     Next
    11. End If
    12.  
    13. Set objWindows = Nothing
    14. Set objIE = Nothing
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  11. #11

    Thread Starter
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83
    Hi TheVader,



    good to see you around again

    yes i do need one that clicks, if you may.
    thanks again


    (BodwadUK thank you too, but i have no idea how to do that)
    Julie Luvs


  12. #12
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Hi Julie

    Alright, I need to know from which site the link is clicked and which link it is.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  13. #13
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    OK, this should do it. I've added a check for the page title because otherwise you wouldn't be able to have any other IE windows opened.
    VB Code:
    1. Dim objWindows As Object, objIE As Object, i As Integer
    2.  
    3. Set objWindows = CreateObject("Shell.Application").windows
    4.  
    5. If objWindows.Count > 0 Then 'Make sure there are windows
    6.     For Each objIE In objWindows
    7.         If InStr(1, objIE.FullName, "IEXPLORE.EXE", vbTextCompare) <> 0 Then 'IE instead of Windows Explorer
    8.             If InStr(1, LCase(objIE.Document.Title), "website.com") <> 0 Then 'Checking if the title contains "website.com"
    9.                 For i = 0 To objIE.Document.links.length - 1 'Loop through the links collection
    10.                     If objIE.Document.links.Item(i).innerText = "Click here" Then 'If the link text is the one we're looking for
    11.                         objIE.Navigate objIE.Document.links.Item(i) 'Navigate to the page
    12.                     End If
    13.                 Next i
    14.             End If
    15.         End If
    16.     Next
    17. End If
    18.  
    19. Set objWindows = Nothing
    20. Set objIE = Nothing
    Last edited by TheVader; May 26th, 2004 at 10:15 AM.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

Posting Permissions

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



Click Here to Expand Forum to Full Width