I would like to have this html parsed to read the headline, and then the story right after it. After it reads the first headline, go to the next and do the same thing, and then when it finished the last headline and story, stop. I just need to know the commands. Attached is the html:
Announcement
Collapse
No announcement yet.
Need a little help with scripting procedure
Collapse
X
-
beachTags: None
-
beach
-
beach
Yes, it is. I only posted a small portion of the page. It is a pretty big page, that's why I didn't post it.
Comment
-
Have you used hs.GetURLIE yet? If so this page isn't going to be too bad because it appears they use a class ID of Headline for each headline. So The first thing to do is to is to grab the page information using getURLIE and search for CLASS="headline">. Is this enough to get you going?
-Rupp
Comment
-
beach
Well,
I know how to do this:
sub main()
Dim strSite
Dim strDocument
Dim strBody
Dim x
strSite="http://www.cubuffs.com"
strDocument="/SportSelect.dbml?DB_OEM_ID=600&KEY=&SPID=255&SPSID=3843"
strBody=hs.GetURl(strSite,strDocument,false,80)
strBody=Replace(strBody,chr(9),"")
strBody=Replace(strBody,chr(10),"")
strBody=Replace(strBody,chr(13),"")
x=Instr(1,strBody,"headline",1)
strBody=Mid(strBody,x)
x=Instr(1,strBody,"headline",1)+10
strBody=Mid(strBody,x)
x=Instr(1,strBody,"</font>",1)-1
strBody=Mid(strBody,1,x)
hs.writelog "debug", strBody
hs.speak strBody
hs.SetDeviceString "v5",strBody
strSite="http://www.cubuffs.com"
strDocument="/SportSelect.dbml?DB_OEM_ID=600&KEY=&SPID=255&SPSID=3843"
strBody=hs.GetURl(strSite,strDocument,false,80)
strBody=Replace(strBody,chr(9),"")
strBody=Replace(strBody,chr(10),"")
strBody=Replace(strBody,chr(13),"")
x=Instr(1,strBody,">CUBuffs.com,",1)
strBody=Mid(strBody,x)
x=Instr(1,strBody,"<BR>",1)+4
strBody=Mid(strBody,x)
x=Instr(1,strBody,"<BR>",1)-1
strBody=Mid(strBody,1,x)
hs.writelog "debug", strBody
hs.speak strBody
hs.SetDeviceString "v5",strBody
end sub
But, I want to combine all the headlines somehow into a subroutine so I don't have to keep writing the same thing over and over
Comment
-
<pre class="ip-ubbcode-code-pre">
sub main()
Dim strSite
Dim strDocument
Dim strBody
Dim x
strSite = "http://www.cubuffs.com"
strDocument = "/SportSelect.dbml?DB_OEM_ID=600&KEY=&SPID=255&SPSID=3843"
strBody = hs.GetUrl(strSite, strDocument, True, 80)
strBody = Replace(strBody, Chr(9), "")
strBody = Replace(strBody, Chr(10), "")
strBody = Replace(strBody, Chr(13), "")
intStart = InStr(1, strBody, "Football - Releases")
intNStart = InStr(intStart + 1, strBody, "Football - Releases")
Do While InStr(intNStart, strBody, "(Get The Full Story)") > 0
intEnd = InStr(intNStart, strBody, "(Get The Full Story)") + 20
FirstHeadLine = Mid(strBody, intNStart, intEnd - intNStart)
Msgbox( FirstHeadLine)
intNStart = intEnd + 1
Loop
end sub
</pre>
-Rupp
Comment
Comment