Login | |
|
 |
RE: How to click a link from VBS. - 6/16/2007 10:09:18 AM
|
|
 |
|
| |
dm_4ever
Posts: 2663
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
This line: objIE.Document.All.myform.getElementsByTagName("Beach Realty") Should still remain objIE.Document.All.myform.getElementsByTagName("a") the (0) would represent the first link...(1) the second...and so on.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: How to click a link from VBS. - 6/16/2007 3:09:12 PM
|
|
 |
|
| |
dm_4ever
Posts: 2663
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
If you use both of these at the same time it will error out because you are declaring a variable twice "Dim oLINK" Dim oLINK : Set oLINK = objIE.Document.All.myform.getElementsByTagName("a")( 0 ) Dim oLINK : Set oLINK = objIE.Document.All.myform.getElementsByTagName("a")( 1 ) If you will use both then try Dim oLINK Set oLINK = objIE.Document.All.myform.getElementsByTagName("a")( 0 ) Set oLINK = objIE.Document.All.myform.getElementsByTagName("a")( 1 ) If you are still getting errors please post the error you are receiving and what you are trying. If you are using On Error Resume Next...comment it out until you get all the bugs worked out. This has been a learning experience for me too which is why I enjoy these forums.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|