Hi ,
I have red the article on this website http://www.mjtnet.com/forum/viewtopic.php?t=1461
Because i am a beginner i have some diffeculties with this code in VB
I know this is a function but how do i use this function (this is new for me)
What's the vb code that extract text with the function below.
'll hope that someone (and maby the auther of it) show me how to do it with a simple example, it looks like very simple but for me it's not (i am a stupid?)
Who has the ability to do this for me and the thousends of all other users of this great program from Mjtnet.
I am a Hollander , or Dutchman transladed in English, I want to send you a send you 20 tulib bulbs in advandige from all the users, that have profit of this code.
Thanks a lot,
Simon from the Netherlands
'This function extracts text from a specific tag by name and index
'e.g. TABLE,0 (1st Table element) or P,1 (2nd Paragraph element)
'set all to 1 to extract all HTML, 0 for only inside text without HTML
Function ExtractTag(TagName,Num,all)
dim t
set t = IE.document.getElementsbyTagname(Tagname)
if all=1 then
ExtractTag = t.Item(Num).outerHTML
else
ExtractTag = t.Item(Num).innerText
end if
End Function
who helps me with a script whats on this site
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 8
- Joined: Sun Apr 09, 2006 10:40 pm
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
This function is part of this script:
http://www.mjtnet.com/forum/viewtopic.php?t=1461
It will only work in conjunction with this script. Then you can use it something like this:
VBRun>CreateIE
VBRun>Navigate,http://www.mjtnet.com/index.htm
Wait>1
VBEval>ExtractTag("P",2,0),result
The function is clearly documented in the comments above it. The above example extracts the text of the second "P" tag in the page.
This function is part of this script:
http://www.mjtnet.com/forum/viewtopic.php?t=1461
It will only work in conjunction with this script. Then you can use it something like this:
VBRun>CreateIE
VBRun>Navigate,http://www.mjtnet.com/index.htm
Wait>1
VBEval>ExtractTag("P",2,0),result
The function is clearly documented in the comments above it. The above example extracts the text of the second "P" tag in the page.
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?