mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Hi,

I'm working on an NFL bot and I've come across a problem that I'm not experienced enough to figure out. I found the HTML string that has the team's score for a particular game, and I need to figure out how to remove the number from the string. The way this will work is that I'll probably examine each string in the line as a space delimited token, and then do whatever needs to be done if it finds the token with the score in it (for each of the two teams in that game). Here's the HTML line so you can see what I'm working with
Code:
class=finalscore align=center><b>7</b></td></tr></table></div></span>

Keep in mind that this could be a one or two digit number, so it needs to work in both cases. Thanks for any help. I'm also still looking for help with using binary variables in a socket script so I can get all the data without it being too much for ordinary variables. Thanks.

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
I wrote a test alias and figured out a way to do this. It's probably the long way, and they syntax will change because this will be in remotes and in a loop, but here's the test alias.
Code:
/test {
  var %line = class=finalscore align=center><b>7</b></td></tr></table></div>
  var %a = $remove($remove(%line,</b></td></tr></table></div>),class=finalscore align=center><b>)
  echo -a %a
}

Let me know if anyone has a better way to do this. Thanks.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Try:

Code:
alias test {  
  var %line = class=finalscore align=center><b>7</b></td></tr></table></div> 
  echo -a $remove($gettok(%line,2,60),b>)
}


-Andy


Link Copied to Clipboard