$Url = 'http://s15.zetaboards.com/Sniper_League/topic/7193078' Global $sSource = BinaryToString(InetRead($Url)) For $i = 1 To 1000 Step +1 $PostCount = StringRegExp($sSource,'(?i)(?s)Post \#(.*?)</a>',1) MsgBox(0, "Test", $PostCount[0]) If @Error Then $Count = $i ExitLoop EndIf Next MsgBox(0, "Test", $Count) Exit While 1 Sleep(10) WEnd
So the posts are labeled with numbers, so I was going to do a StringReg, see how many it counts to and then when it errors out I know that it has found the last post. But my thing returns an error because it didn't find a match. The content is:
Post #2</a>
So the stringreg I thought would pull a "1" and then a "2" and stop. But it didn't. Not sure what I did wrong, I've always been fail at StringReg. I'm also quite tired. So I'm heading off to bed, if I don't think of something I'll check back in
Thanks!






