Jump to content

how can i fix this


Recommended Posts

Hi, I need some help

Here is my code

Dim $ColorToggle = 0 ; Boolean toggle for Red/Blue TD colors
if Not FileExists(@ScriptDir & "/N9mfk_*.HTML") Then
    MsgBox(0,"There are no Files",@ScriptDir & "/n9mfk_*.html")
    Exit
    EndIf
IF Not FileExists(@ScriptDir & "\input")Then
DirCreate (@ScriptDir & "\input")
EndIf
IF Not FileExists(@ScriptDir & "\output")Then
DirCreate (@ScriptDir & "\output")
EndIf
If FileExists(@ScriptDir & "/N9mfk_*.HTML") Then
FileCopy(@ScriptDir & "/n9mfk_*.html",@ScriptDir & "\input",1)
EndIf
$size = DirGetSize(@ScriptDir &"/input/",1)
$number = $size[1]
For $count = 1 To $number
$FileIn = @ScriptDir & "\input\n9mfk_"&$count&".html"
$FileOut = @ScriptDir & "\output\n9mfk_"&$count&".html"
$FileInData = FileRead($FileIn, FileGetSize($FileIn))
$avSplitData = StringSplit($FileInData, "<TD", 1)

;MsgBox(0,"",$FileInData)
;$FileInData = StringReplace($FileinData, "background","background=")
$FileOutData = $avSplitData[1]
For $n = 2 To $avSplitData[0]
    $End = StringInStr($avSplitData[$n], "</TD>", 0, -1)
    $EndLen = StringLen($avSplitData[$n]) - $End + 1
    $EndText = StringRight($avSplitData[$n], $EndLen)
    $avSplitData[$n] = StringTrimRight($avSplitData[$n], $EndLen)
  ;MsgBox(0,"",$n)
  $graphic ='"newpageback.gif"'
  ;$back = "<body background="&$graphic& " bgcolor"
  If Mod($n, 2) = 0 Then ; If even numbered TD, change the color
            If $ColorToggle Then
                $color = ' bgcolor="red"'
            Else
                $color = ' bgcolor="blue"'
            EndIf
            $ColorToggle = Not $ColorToggle
        EndIf


  ;$color =' bgcolor="red"'
  $FileOutData = StringReplace($FileOutData, "<body background bgcolor","<body background="&$graphic& " bgcolor")
  $FileOutData &= "<TD" & $color & StringReplace($avSplitData[$n], "0", "Ø") & $EndText
  $FileOutData = StringReplace($FileOutData, "with","of " &$number &" with")
Next
$hFileOut = FileOpen($FileOut, 2)
FileWrite($hFileOut, $FileOutData)
FileClose($hFileOut)
FileClose($FileIn)
FileClose($FileOut)
Run('Notepad.exe "' & $FileOut & '"')
next

here is my input file

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>N9MFK Logbook</title>

</head>

<body background bgcolor="#FFFFFF" text="#000000" link="#3366FF" vlink="#9900FF" alink="#000066">

<!--mstheme--><font face="Century Gothic, Arial, Helvetica">

<p ALIGN=center><b><font face="Arial" size="5">N9MFK Logbook <b><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created on: 5/19/2007

</font><font face="Arial" size="2"

S-Type="REGENERATED" S-Format="%m/%d/%Y %H:%M"<!--webbot

bot="Timestamp" I-CheckSum="26219" endspan -->

</font></b></p>

<p><font face="Arial" size="2">

<TABLE WIDTH="85%"ALIGN=center BORDER="1"CELLSPACING="1"CELLPADDING="4">

<TR>

<TD ALIGN=center><FONT SIZE="2">CALL</font/></TD><TD ALIGN=center><FONT SIZE="2">PFX</font/></TD><TD ALIGN=center><FONT SIZE="2">BAND</font/></TD><TD ALIGN=center><FONT SIZE="2">MODE</font/></TD><TD ALIGN=center><FONT SIZE="2">RCVD</font/></TD><TD ALIGN=center><FONT SIZE="2">SENT</font/></TD><TD ALIGN=center><FONT SIZE="2">QSL-R</font/></TD><TD ALIGN=center><FONT SIZE="2">QSL-S</font/></TD><TD ALIGN=center><FONT SIZE="2">COUNTRY</font/></TD><TD ALIGN=center><FONT SIZE="2">COUNTY</font/></TD></TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">N8RZZ </font/></TD><TD ALIGN=center><FONT SIZE="2">N8 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">USA </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">W1AW </font/></TD><TD ALIGN=center><FONT SIZE="2">W1 </font/></TD><TD ALIGN=center><FONT SIZE="2">15M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">33 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">USA </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">K9UXZ </font/></TD><TD ALIGN=center><FONT SIZE="2">K9 </font/></TD><TD ALIGN=center><FONT SIZE="2">20M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">52 </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">USA </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">RN6BY </font/></TD><TD ALIGN=center><FONT SIZE="2">RN6 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">Y </font/></TD><TD ALIGN=center><FONT SIZE="2">Y </font/></TD><TD ALIGN=center><FONT SIZE="2">European Russia </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">O5MDP </font/></TD><TD ALIGN=center><FONT SIZE="2">O5 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">55 </font/></TD><TD ALIGN=center><FONT SIZE="2">55 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">ES1QD </font/></TD><TD ALIGN=center><FONT SIZE="2">ES1 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">Estonia </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">F5NSB </font/></TD><TD ALIGN=center><FONT SIZE="2">F5 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">55 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">France </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">IK6BRJ </font/></TD><TD ALIGN=center><FONT SIZE="2">IK6 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">Italy </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">S58N </font/></TD><TD ALIGN=center><FONT SIZE="2">S58 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">Slovenia </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD ALIGN=center><FONT SIZE="2">4X4BO </font/></TD><TD ALIGN=center><FONT SIZE="2">4X4 </font/></TD><TD ALIGN=center><FONT SIZE="2">10M </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">Israel </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

</TABLE>

</font></p>

<p ALIGN=left><b><font face="Arial" size="2">Page Number: 1 with 10 QSOs Listed.<br>

<p> </p>

<b><font face="Arial" size="1" color="#000000">Created by LogPrint version: 2.7.0 Copyright 2007 B. Charles Sutton, W1MCP <br></p>

<!--mstheme--></font>

</body>

</html>

here the output form my script

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>N9MFK Logbook</title>

</head>

<body background="newpageback.gif" bgcolor="#FFFFFF" text="#000000" link="#3366FF" vlink="#9900FF" alink="#000066">

<!--mstheme--><font face="Century Gothic, Arial, Helvetica">

<p ALIGN=center><b><font face="Arial" size="5">N9MFK Logbook <b><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created on: 5/19/2007

</font><font face="Arial" size="2"

S-Type="REGENERATED" S-Format="%m/%d/%Y %H:%M"<!--webbot

bot="Timestamp" I-CheckSum="26219" endspan -->

</font></b></p>

<p><font face="Arial" size="2">

<TABLE WIDTH="85%"ALIGN=center BORDER="1"CELLSPACING="1"CELLPADDING="4">

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">CALL</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">PFX</font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">BAND</font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">MODE</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">RCVD</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SENT</font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">QSL-R</font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">QSL-S</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">COUNTRY</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">COUNTY</font/></TD></TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">N8RZZ </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">N8 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">USA </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">W1AW </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">W1 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">15M </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">33 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">USA </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">K9UXZ </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">K9 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">2ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">52 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">USA </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">RN6BY </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">RN6 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">Y </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">Y </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">European Russia </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">O5MDP </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">O5 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">55 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">55 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">ES1QD </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">ES1 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Estonia </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">F5NSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">F5 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">55 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">France </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">IK6BRJ </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">IK6 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Italy </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">S58N </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">S58 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">Slovenia </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">4X4BO </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">4X4 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Israel </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

</TABLE>

</font></p>

<p ALIGN=left><b><font face="Arial" size="2">Page Number: 1 of 18 with 10 QSOs Listed.<br>

<p> </p>

<b><font face="Arial" size="1" color="#000000">Created by LogPrint version: 2.7.0 Copyright 2007 B. Charles Sutton, W1MCP <br></p>

<!--mstheme--></font>

</body>

</html>

every thing is ok in the output except the the bgcolor changes 4 time in one row

I do went it to change every other row but I wet it to change to hole row at once

it like $n changes in mid stream

this is what i went how can i fix my code to get this thanks

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>N9MFK Logbook</title>

</head>

<body background="newpageback.gif" bgcolor="#FFFFFF" text="#000000" link="#3366FF" vlink="#9900FF" alink="#000066">

<!--mstheme--><font face="Century Gothic, Arial, Helvetica">

<p ALIGN=center><b><font face="Arial" size="5">N9MFK Logbook <b><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created on: 5/19/2007

</font><font face="Arial" size="2"

S-Type="REGENERATED" S-Format="%m/%d/%Y %H:%M"<!--webbot

bot="Timestamp" I-CheckSum="26219" endspan -->

</font></b></p>

<p><font face="Arial" size="2">

<TABLE WIDTH="85%"ALIGN=center BORDER="1"CELLSPACING="1"CELLPADDING="4">

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">CALL</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">PFX</font/></TD><TD bgcolor="Blue" ALIGN=center><FONT SIZE="2">BAND</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">MODE</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">RCVD</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SENT</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">QSL-R</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">QSL-S</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">COUNTRY</font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">COUNTY</font/></TD></TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">N8RZZ </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">N8 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">USA </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">W1AW </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">W1 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">15M </font/></TD><TD bgcolor="Blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">33 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">USA </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">K9UXZ </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">K9 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">2ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">52 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">USA </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">RN6BY </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">RN6 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Y </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Y </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">European Russia </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">O5MDP </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">O5 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">55 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">55 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">ES1QD </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">ES1 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Estonia </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">F5NSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">F5 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">55 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">France </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">IK6BRJ </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">IK6 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Italy </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="red" ALIGN=center><FONT SIZE="2">S58N </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">S58 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">59 </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">Slovenia </font/></TD><TD bgcolor="red" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

<TR>

<TD bgcolor="blue" ALIGN=center><FONT SIZE="2">4X4BO </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">4X4 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">57 </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">Israel </font/></TD><TD bgcolor="blue" ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

</TABLE>

</font></p>

<p ALIGN=left><b><font face="Arial" size="2">Page Number: 1 of 18 with 10 QSOs Listed.<br>

<p> </p>

<b><font face="Arial" size="1" color="#000000">Created by LogPrint version: 2.7.0 Copyright 2007 B. Charles Sutton, W1MCP <br></p>

<!--mstheme--></font>

</body>

</html>

Link to comment
Share on other sites

Delete all the instances of <TD bgcolor...> and put the background color flags on the <TR> tags instead.

For example change these lines:

im $ColorToggle = 0 ; Boolean toggle for Red/Blue TR colors
; ...

    $avSplitData = StringSplit($FileInData, "<TR", 1)
    ;MsgBox(0,"",$FileInData)
    ;$FileInData = StringReplace($FileinData, "background","background=")
    $FileOutData = $avSplitData[1]
    For $n = 2 To $avSplitData[0]
        $End = StringInStr($avSplitData[$n], "</TR>", 0, -1)
        $EndLen = StringLen($avSplitData[$n]) - $End + 1
        $EndText = StringRight($avSplitData[$n], $EndLen)
        $avSplitData[$n] = StringTrimRight($avSplitData[$n], $EndLen)
        ;MsgBox(0,"",$n)
        $graphic = '"newpageback.gif"'
        ;$back = "<body background="&$graphic& " bgcolor"
        If Mod($n, 2) = 0 Then ; If even numbered TR, change the color
            If $ColorToggle Then
                $color = ' bgcolor="red"'
            Else
                $color = ' bgcolor="blue"'
            EndIf
            $ColorToggle = Not $ColorToggle
        EndIf
        ;$color =' bgcolor="red"'
        $FileOutData = StringReplace($FileOutData, "<body background bgcolor", "<body background=" & $graphic & " bgcolor")
        $FileOutData &= "<TR" & $color & StringReplace($avSplitData[$n], "0", "Ø") & $EndText
        $FileOutData = StringReplace($FileOutData, "with", "of " & $number & " with")
    Next

As I said in the reply to the PM you sent me. Did it not work?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Delete all the instances of <TD bgcolor...> and put the background color flags on the <TR> tags instead.

For example change these lines:

im $ColorToggle = 0 ; Boolean toggle for Red/Blue TR colors
; ...

    $avSplitData = StringSplit($FileInData, "<TR", 1)
    ;MsgBox(0,"",$FileInData)
    ;$FileInData = StringReplace($FileinData, "background","background=")
    $FileOutData = $avSplitData[1]
    For $n = 2 To $avSplitData[0]
        $End = StringInStr($avSplitData[$n], "</TR>", 0, -1)
        $EndLen = StringLen($avSplitData[$n]) - $End + 1
        $EndText = StringRight($avSplitData[$n], $EndLen)
        $avSplitData[$n] = StringTrimRight($avSplitData[$n], $EndLen)
        ;MsgBox(0,"",$n)
        $graphic = '"newpageback.gif"'
        ;$back = "<body background="&$graphic& " bgcolor"
        If Mod($n, 2) = 0 Then ; If even numbered TR, chdange the color
            If $ColorToggle Then
                $color = ' bgcolor="red"'
            Else
                $color = ' bgcolor="blue"'
            EndIf
            $ColorToggle = Not $ColorToggle
        EndIf
        ;$color =' bgcolor="red"'
        $FileOutData = StringReplace($FileOutData, "<body background bgcolor", "<body background=" & $graphic & " bgcolor")
        $FileOutData &= "<TR" & $color & StringReplace($avSplitData[$n], "0", "Ø") & $EndText
        $FileOutData = StringReplace($FileOutData, "with", "of " & $number & " with")
    Next

As I said in the reply to the PM you sent me. Did it not work?

:)

hi the last pm had no code

i had to remove the $colortiger lines it was color 2 by 2

Link to comment
Share on other sites

hi psaltyds

how could i move up the td so it be on the line with the tr

thanks

<TR class="d0"><TD ALIGN=center><FONT SIZE="2">CALL</font/></TD><TD ALIGN=center><FONT SIZE="2">PFX</font/></TD><TD ALIGN=center><FONT SIZE="2">BAND</font/></TD><TD ALIGN=center><FONT SIZE="2">MODE</font/></TD><TD ALIGN=center><FONT SIZE="2">RCVD</font/></TD><TD ALIGN=center><FONT SIZE="2">SENT</font/></TD><TD ALIGN=center><FONT SIZE="2">QSL-R</font/></TD><TD ALIGN=center><FONT SIZE="2">QSL-S</font/></TD><TD ALIGN=center><FONT SIZE="2">COUNTRY</font/></TD><TD ALIGN=center><FONT SIZE="2">COUNTY</font/></TD></TR>

<TR class="d1">

<TD ALIGN=center><FONT SIZE="2">N8RZZ </font/></TD><TD ALIGN=center><FONT SIZE="2">N8 </font/></TD><TD ALIGN=center><FONT SIZE="2">1ØM </font/></TD><TD ALIGN=center><FONT SIZE="2">SSB </font/></TD><TD ALIGN=center><FONT SIZE="2">59 </font/></TD><TD ALIGN=center><FONT SIZE="2">57 </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD><TD ALIGN=center><FONT SIZE="2">USA </font/></TD><TD ALIGN=center><FONT SIZE="2">&nbsp </font/></TD>

</TR>

Link to comment
Share on other sites

I don't know what you're asking, and I'm not an HTML guru anyway. Hope you get an answer from someone who is... :)

hi psaltyds

how could i move up the td so it be on the line with the tr

thanks

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I don't know what you're asking, and I'm not an HTML guru anyway. Hope you get an answer from someone who is... :)

I add this line to the code 
$avSplitData[$n] = StringStripCR($avSplitData[$n])

why wood tis add an line feed to the string

is there a command to strip a line feed thanks beau

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...