QUOTE (Ed_P @ Mar 6 2006, 06:27 AM)

I'll be dipped!!!

Thanks
d4vr0s.
And thank you
Plugin Builder.

This thing is
really cool! Wow, a whole new world opens up.

Lightgreen 0: no differences.
Red 1: (ex. nu2menu.exe) files differ.
Red "other number" (ex. nu2menu.inf) difference at line number.

Thanks. WOW, Cool and Smiley dribbled, usually motivates me to
construct and publish some additional information.
The something like this:
[... "<td onClick='vb script:createObject(""wScript.shell
"").run """"""pfe32"""" /g" & LINENUMBER & " """""& FILE0 & """"""":
createObject ...SNIP... & FILE1 & """""""'>" & diff & "</td>" ... ]
would open two files in the same editor window along with jumping to a line number, but
since both Firefox wont, and the Pfe32.exe editor should be opened before the process along with
some of my settings/preferences, then I found another solution just like this instead:
'*** Replace this line:
select case b: case 11 i=i+1: case else a(i,-(b>1))=""
'*** with this line instead:
select case b: case 11 MyFiles a(i,0),a(i,1): i=i+1: case else a(i,-(b>1))=""
'*** Then append the following 3 functions to the end of DEMO.VBS:
sub MyFiles(byVal path0, byVal path1)
path0= lCase(path0): path1= lCase(path1)
dim htm:htm= "C:\tmp1.htm"
dim str0,str1,arr,iEnd,i,a(2000,1),b,len0,len1,f,diff
str0= lcase(GetFiles(path0,true,""))
str1= lcase(GetFiles(path1,true,""))
arr = split(str0 & str1,vbLf): iEnd= uBound(arr)-1: sort arr,iEnd
for i=0 to iEnd
a(i,0)= replace(arr(i), path1, path0)
a(i,1)= replace(arr(i), path0, path1)
b= -(instr(str0,a(i,0)& vbLf)>0)& -(instr(str1,a(i,1)& vbLf)>0)
select case b:case 11 i=i+1:case else a(i,-(b>1))="":end select
next
len0= len(path0)+2: len1= len(path1)+2
set f= fso.openTextFile(htm,2,true)
f.write"<html><head><style>"& vbCrLf & "img{border:0;}"&_
"a:link,a:visited,a:hover,a:active{font-weight:bold;color:blue;"_
&"text-decoration:none;"_
&"line-height:12px;}a:hover,a:active{background-color:red;}"_
& vbCrLf & "</style></head>" & vbCrLf & "<body bgColor=#f5f5f5>"
f.writeLine"<table border=1>" & vbCrLf _
&"<tr><td><a target=a href="""& path0 & """>"&path0 &"</a></td>"_
&"<td><a target=b href="""& path1 &""">"& path1 &"</a></td>"_
&"<td></td></tr>"
for i=0 to iEnd
if a(i,0) & a(i,1) <> "" then
f.writeLine"<tr>"
f.writeLine"<td><a target=a href=""file:\"& a(i,0) &""">"_
& mid(a(i,0),len0) &"</a></td>"
f.writeLine"<td><a target=b href=""file:\"& a(i,1) &""">"_
& mid(a(i,1),len1) &"</a></td>"
diff= Difference(a(i,0), a(i,1))
select case diff
case -1 f.write"<td borderColor=#ff0000 bgColor=#f5f5f5>"
case 0 f.write"<td borderColor=#f5f5f5 bgColor=#90ee90>"
case else f.write"<td borderColor=#f5f5f5 bgColor=#ff0000>"
end select: f.writeLine diff & "</td></tr>"
end if
next
f.writeLine"</table></body></html>":f.close
createObject("wScript.shell").run htm
msgBox path0 & vbLf & path1, 4096, "/ Press ESC Key . . ."
end sub
function GetFiles(P,Recurse,List): dim f
for each f in FSO.getFolder(P).files
List= List & f & vbLf
next
if(Recurse)then
for each f in FSO.getFolder(P).subfolders
GetFiles f,Recurse,List
next
end if
GetFiles= List
end function
function Difference(byVal file0, byVal file1)
if not fso.fileExists(file0) _
or not fso.fileExists(file1) _
then Difference= -1:exit function
Difference= 0: dim f0,f1,r0,r1,lineNumb:lineNumb=true
if inStr(1,".exe.com.zip.bin.iso",_
right(file0,4),1)then lineNumb=false
set f0= fso.openTextFile(file0,1)
set f1= fso.openTextFile(file1,1): on error resume next
do: Difference= Difference +1
if lineNumb then
r0= f0.readLine: r1= f1.readLine
else r0= f0.read(100000000): r1= f1.read(100000000)
end if
if r0 <> r1 then on error goto 0:exit function
loop until err: on error goto 0: Difference= 0
end function