Using the Recorder, how do I change the script to make it select the second "here" on the page.
Click here
Click here
The code below was done using the Wizard but the little bugger only selects the first here and none of the others. I think it is something to do with the index = 0 or index = 1 for second here but I do not know how to use it.
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"here"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
Thanks
Tom
Using the macro recorder, how do I click the second here.
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, where there are two identical links with the same text you can't use the standard TEXT attribute to identify it since that is not unique. Instead you can use INDEX. To identify the value of the index either view the source of the page and count the number of FrameName={""}
Let>FormName={""}
Let>TagValue={"6"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,INDEX,str:TagValue
Let>FormName={""}
Let>TagValue={"6"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,INDEX,str:TagValue
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, where there are two identical links with the same text you can't use the standard TEXT attribute to identify it since that is not unique. Instead you can use INDEX. To identify the value of the index either view the source of the page and count the number of FrameName={""}
Let>FormName={""}
Let>TagValue={"6"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,INDEX,str:TagValue
Let>FormName={""}
Let>TagValue={"6"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,INDEX,str:TagValue
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Thanks Marcus, but I must be slow, I still can't get it to work.
The test.htm file looks like below... ? represents the FrameName={""}
Let>FormName={""}
Let>TagValue={"?"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
### Click on the second here link ###
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"?"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
Can you tell me what goes in each tagvalue in this specific case:
The test.htm file looks like below... ? represents the FrameName={""}
Let>FormName={""}
Let>TagValue={"?"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
### Click on the second here link ###
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"?"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
Can you tell me what goes in each tagvalue in this specific case:
Boy your html stripper is working great, nothing gets by.
I will try to send the file without the code to make it look like html.
tom1.htm here
tom2.htm here
tom3.htm here
tom4.htm here
Just picture the above files as placed in the html format so that when you click each here it would go to each specific file.
Lets see if this gets by the html stripper as there is no html.
I will try to send the file without the code to make it look like html.
tom1.htm here
tom2.htm here
tom3.htm here
tom4.htm here
Just picture the above files as placed in the html format so that when you click each here it would go to each specific file.
Lets see if this gets by the html stripper as there is no html.
Using the wizard the tags come out as follows:
A 0 first here
A 1 second here
A 2 third here
A 3 4th here.
When I placed the 0 thru 3 in the tagvalue it failed click any of them.
### Click the second here ###
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"1"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
A 0 first here
A 1 second here
A 2 third here
A 3 4th here.
When I placed the 0 thru 3 in the tagvalue it failed click any of them.
### Click the second here ###
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"1"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
When posting to the forum tick the "Disable HTML in this post" option to prevent html being seen as html and it will therefore just display as text and not be stripped.
Anyway, the reason your code isn't working is that you're still using the TEXT attribute. Use the INDEX attribute:
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"1"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,INDEX,str:TagValue
Anyway, the reason your code isn't working is that you're still using the TEXT attribute. Use the INDEX attribute:
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"1"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,INDEX,str:TagValue
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?