mIRC Home    About    Download    Register    News    Help

Print Thread
#67676 13/01/04 06:44 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i have this alias, that writes a html ifle based on a text file that looks like this:
Code:
09/01/2004 	 192.168.1.101 	 Chaos 	 1on1 	 West 	 1.6 	 Win 	


im trying to write that info to the html file in a tabe, heres my alias:
Code:
alias cs.rec.g {
  write -c CSRecords.html <html><head><title>CS Scrim Records</title></head>
  write CSRecords.html <body bgcolor=black text=white link=red alink=red vlink=red><center>
  write CSRecords.html $cs.rec.gscri Scrims<br>
  write CSRecords.html $cs.rec.gwins Wins<br>
  write CSRecords.html $cs.rec.gloss Losses<br><br>
  write CSRecords.html <table bgcolor=black border=2 cellspacing=1 cellpadding=1>
  write CSRecords.html <tr><td>Date</td><td>Server IP</td><td>Clan</td><td>XonX</td><td>Location</td><td>Version</td><td>Outcome</td>
  write CSRecords.html
  ;Stuff here, but cant figure out how to do it
  write CSRecords.html </table>
}


http://MTec89Net.com
irc.freenode.net #MTec89Net
#67677 13/01/04 08:05 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
alias cs.rec.gwrite {
var %i 1
while $read($txtfile(cs.txt),%i) {
write CsRecords.html <tr><td> $replace($read($txtfile(cs.txt),%i),$chr(32),</td><td>) </tr></td>
inc %i
}
}
providing each piece of info is seperated by only 1 space, that should work smile.
-untested


New username: hixxy
#67678 13/01/04 08:52 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
you misspelled my $tstdir var, but its still not working i get a table looking like this:
Code:
&lt;table bgcolor=black border=2 cellspacing=1 cellpadding=1&gt;
&lt;tr&gt;&lt;td&gt;Date&lt;/td&gt;&lt;td&gt;Server IP&lt;/td&gt;&lt;td&gt;Clan&lt;/td&gt;&lt;td&gt;XonX&lt;/td&gt;&lt;td&gt;Location&lt;/td&gt;&lt;td&gt;Version&lt;/td&gt;&lt;td&gt;Outcome&lt;/td&gt;
&lt;tr&gt;&lt;td&gt; 09/01/2004&lt;/td&gt;	&lt;/td&gt;192.168.1.101&lt;/td&gt;	&lt;/td&gt;Chaos&lt;/td&gt;	&lt;/td&gt;1on1&lt;/td&gt;	&lt;/td&gt;West&lt;/td&gt;	&lt;/td&gt;1.6&lt;/td&gt;	&lt;/td&gt;Win&lt;/td&gt;	 &lt;/tr&gt;
&lt;/table&gt;

Code:
alias cs.rec.g {
  write -c CSRecords.html &lt;html&gt;&lt;head&gt;&lt;title&gt;CS Scrim Records&lt;/title&gt;&lt;/head&gt;
  write CSRecords.html &lt;body bgcolor=black text=white link=red alink=red vlink=red&gt;&lt;center&gt;
  write CSRecords.html &lt;table bgcolor=black border=2 cellspacing=1 cellpadding=1&gt;
  write CSRecords.html &lt;tr&gt;&lt;td&gt;Date&lt;/td&gt;&lt;td&gt;Server IP&lt;/td&gt;&lt;td&gt;Clan&lt;/td&gt;&lt;td&gt;XonX&lt;/td&gt;&lt;td&gt;Location&lt;/td&gt;&lt;td&gt;Version&lt;/td&gt;&lt;td&gt;Outcome&lt;/td&gt;
  cs.rec.gwrite
  write CSRecords.html &lt;/table&gt;
}
alias cs.rec.gwrite {
  var %i 1
  while $read($txtfile(cs.txt),%i) {
    write CSRecords.html &lt;tr&gt;&lt;td&gt; $replace($read($txtfile(cs.txt),%i),$chr(32),&lt;/td&gt;) &lt;/tr&gt;
    inc %i
  }
}

Last edited by MTec89; 13/01/04 08:57 PM.

http://MTec89Net.com
irc.freenode.net #MTec89Net
#67679 13/01/04 08:57 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
edited^


New username: hixxy
#67680 13/01/04 08:58 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
edited^ :P


http://MTec89Net.com
irc.freenode.net #MTec89Net

Link Copied to Clipboard