Hi, I was wondering how would I be able to click a link on IE?
:afrog:
Printable View
Hi, I was wondering how would I be able to click a link on IE?
:afrog:
Use the mouse point on the link and click left mouse button :D :D
Beat you all :lol: :lol:
No but seriously....
Couldnt you just goto the URL instead of loading the original page.
What is it you are actually doing:confused:
well, yes i can do that, but im trying to make it clicks all IE browers thats open
:)
any ideas how?
Sorry but this sounds suspicious
WHAT???? :confused: :confused:
Why???? :confused: :confused:
suspicious?
hm.. ok
if you not going to help, there no need for your disrespectful comments, please let someone else reply. thank you
:lol:
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? :confused:
it's a link on a page on a forum im an editor of
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 :) :)
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.Quote:
WHAT????
Why????
No. no, this is much easier... :p 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:
Dim objWindows As Object, objIE As Object Set objWindows = CreateObject("Shell.Application").windows If objWindows.Count > 0 Then 'Make sure there are windows For Each objIE In objWindows If InStr(1, objIE.FullName, "IEXPLORE.EXE", vbTextCompare) <> 0 Then 'IE instead of Windows Explorer objIE.Navigate "http://www.vbforums.com" End If Next End If Set objWindows = Nothing Set objIE = Nothing
Hi TheVader,
:wave:
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)
Hi Julie :wave:
Alright, I need to know from which site the link is clicked and which link it is. :)
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:
Dim objWindows As Object, objIE As Object, i As Integer Set objWindows = CreateObject("Shell.Application").windows If objWindows.Count > 0 Then 'Make sure there are windows For Each objIE In objWindows If InStr(1, objIE.FullName, "IEXPLORE.EXE", vbTextCompare) <> 0 Then 'IE instead of Windows Explorer If InStr(1, LCase(objIE.Document.Title), "website.com") <> 0 Then 'Checking if the title contains "website.com" For i = 0 To objIE.Document.links.length - 1 'Loop through the links collection If objIE.Document.links.Item(i).innerText = "Click here" Then 'If the link text is the one we're looking for objIE.Navigate objIE.Document.links.Item(i) 'Navigate to the page End If Next i End If End If Next End If Set objWindows = Nothing Set objIE = Nothing