Jump to content

Parse Text


Recommended Posts

im making this thing that gets the source from a page and then reads a line and if its right then it will read another line get a name then send a link which will attack a person but yeah so basicaly

where it says McLaren F1 its going to be different each time, and i want it to check if its 99.99% then it will read line 42 which is

<td width='70%' class='cell_style_2_align' align='left' height='15'>&nbsp; <a href='/rz/rz_files/challenge_create.php?user=travis9705' class='font_style_1'><img src='/gfx/icons/challenge.gif' border='0'></a> <a href='/rz/rz_files/mail_system.php?mode=compose&target=travis9705' class='font_style_1'><img src='/gfx/icons/mail.jpg' border='0'></a> <b><a class='font_style_1' href='/rz/rz_files/profile.php?user=travis9705'>travis9705</a></b>

it will then get the name travis9705 which will be dif each time

then it will send the link

http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=travis9705&tid=3&type=global

except of course opponent is going to be what ever user is parsed from the line

#include <INet.au3>
#include <File.au3>
$source = _INetGetSource('http://www.racezoneonline.com/rz/rz_files/race_ladder.php?type=global')
filedelete(@desktopdir & "/source.txt")
_filecreate(@desktopdir & "/source.txt")
$file = (@desktopdir & "/source.txt")
filewrite($file, $source)
$read = Filereadline($file,"45")
if $read = "<tr><td width='70%' class='cell_style_2_align' align='left' height='15'> &nbsp; McLaren F1 [99.99%]</td></tr>" Then
    $read2 = Filereadline($file,"42")
Link to comment
Share on other sites

  • Moderators

im making this thing that gets the source from a page and then reads a line and if its right then it will read another line get a name then send a link which will attack a person but yeah so basicaly

where it says McLaren F1 its going to be different each time, and i want it to check if its 99.99% then it will read line 42 which is

<td width='70%' class='cell_style_2_align' align='left' height='15'>&nbsp; <a href='/rz/rz_files/challenge_create.php?user=travis9705' class='font_style_1'><img src='/gfx/icons/challenge.gif' border='0'></a> <a href='/rz/rz_files/mail_system.php?mode=compose&target=travis9705' class='font_style_1'><img src='/gfx/icons/mail.jpg' border='0'></a> <b><a class='font_style_1' href='/rz/rz_files/profile.php?user=travis9705'>travis9705</a></b>

it will then get the name travis9705 which will be dif each time

then it will send the link

http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=travis9705&tid=3&type=global

except of course opponent is going to be what ever user is parsed from the line

#include <INet.au3>
#include <File.au3>
$source = _INetGetSource('http://www.racezoneonline.com/rz/rz_files/race_ladder.php?type=global')
filedelete(@desktopdir & "/source.txt")
_filecreate(@desktopdir & "/source.txt")
$file = (@desktopdir & "/source.txt")
filewrite($file, $source)
$read = Filereadline($file,"45")
if $read = "<tr><td width='70%' class='cell_style_2_align' align='left' height='15'> &nbsp; McLaren F1 [99.99%]</td></tr>" Then
    $read2 = Filereadline($file,"42")
Is there a question here?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

yes how can i parse the text with like strings so i can basicaly get if it hass 99.99% in the 45th line and the name of the person at the end of the 42nd line

This is the 42nd line

<td width='70%' class='cell_style_2_align' align='left' height='15'>&nbsp; <a href='/rz/rz_files/challenge_create.php?user=travis9705' class='font_style_1'><img src='/gfx/icons/challenge.gif' border='0'></a> <a href='/rz/rz_files/mail_system.php?mode=compose&target=travis9705' class='font_style_1'><img src='/gfx/icons/mail.jpg' border='0'></a> <b><a class='font_style_1' href='/rz/rz_files/profile.php?user=travis9705'>travis9705</a></b>

and i want to get the name which is travis9705 but the length and the name will be chaning so i can do any stringtrims and stuff

and the 45th line is

<tr><td width='70%' class='cell_style_2_align' align='left' height='15'> &nbsp; McLaren F1 [99.99%]</td></tr>

which i want to see if it has the 99.99% in it

Edited by thatsgreat2345
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...