I have this HTA File Window that opens up the contents of a log file in a folder in the C:\ directory, into the HTA Window. If I do not have the refresh script line in, it will load all of the contents of the log file into the HTA, but if I want to update it, I have to close it and reopen it. The log is getting created by batch, there is no problem with that. Now, when I add the refresh line to the HTA, it only opens up the last line that was in the log, and when it refreshes, it replaces the current log that is loaded into the HTA with the last line of the log when it was added. Can anybody help me with this? I want the the HTA to open all the contents of the log file into the HTA, does anyone know how to do that? I will post my HTA up in here.
I was talking to Britec09 on You Tube, he said there is this guy named Bradley that might be able to help me. Well here is my HTA.
Script without Bradleys help. (Below)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Script #1.
<Title>Log of installation</Title>
<HTA:APPLICATION ID="Log"
SCROLL="Auto"
SCROLLFLAT="No"
SingleInstance="Yes"
ShowInTaskbar="Yes"
SysMenu="Yes"
MaximizeButton="No"
MinimizeButton="No"
Border="Thin"
BORDERSTYLE="Complex"
INNERBORDER="No"
Caption="Yes"
WindowState="Normal"
APPLICATIONNAME="MainApp"
Icon="%SystemRoot%\winhlp32.exe">
<STYLE type="text/css">
BODY
{
Font-Size:8.25pt;
Font-Weight:Bold;
Font-Family:Lucida Console;
Color:#FFFFFF;
BackGround-Color:#000000;
Margin-Top:12;
Margin-Bottom:0;
Margin-Left:10;
Margin-Right:12;
Padding-Top:0;
Padding-Bottom:0;
Padding-Left:0;
Padding-Right:0;
Text-Align:Left;
Vertical-Align:Top;
}
TD.Type1
{
Margin-Left:0;
Padding-Left:0;
}
</STYLE>
<script Language='VBSCRIPT'>
'-> Resize And Move Window
Dim Wth :Wth = int(800)
Dim Hht :Hht = int(200)
window.ResizeTo Wth, Hht
MoveTo ((Screen.Width / 2) - (Wth / 2)),((Screen.Height / 1.1) - (Hht / 1))
'-> Text Display Varible
Dim F1 :F1 = "<FONT STYLE='Font:8.25pt;Color:#FFFFFF;Font-Weight:Bold;'>"
'-> OnLoad Action
Function Window_OnLoad()
txt1.innerHTML = F1 & "*********************************************************************************************</FONT>"
txt2.innerHTML = F1 & "This Scirpt was created by Metroidn1f. (Franky Magliocco)</FONT>"
txt3.innerHTML = F1 & "*********************************************************************************************</FONT>"
call setInterval("refresh()", 300)
End Function
</SCRIPT>
<BODY Scroll='Auto'>
<!-- txt1 Display -->
<Table><TD Class='Type1'><Span ID='txt1'></Span></TD></Table>
<!-- txt2 Display -->
<CENTER><Table><TD Class='Type1'><Span ID='txt2'></Span></TD></Table></CENTER>
<!-- txt3 Display -->
<Table><TD Class='Type1'><Span ID='txt3'></Span></TD></Table>
<SCRIPT LANGUAGE="VBScript">
function getdata()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("C:\Metroidn1f Log\Log.log", 1)
Do Until objTextFile.AtEndOfStream
getdata = objTextFile.Readline & "<br>"
Loop
end function
function refresh()
document.all.upd.InnerHTML = getdata()
end function
document.write "<SPAN id='upd'>" & getdata() & "</SPAN>"
</script>
</BODY>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Script with Bradleys help. (Below)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Script #2.
<Title>Log of installation</Title>
<HTA:APPLICATION ID="Log"
SCROLL="Auto"
SCROLLFLAT="No"
SingleInstance="Yes"
ShowInTaskbar="Yes"
SysMenu="Yes"
MaximizeButton="No"
MinimizeButton="No"
Border="Thin"
BORDERSTYLE="Complex"
INNERBORDER="No"
Caption="Yes"
WindowState="Normal"
APPLICATIONNAME="MainApp"
Icon="%SystemRoot%\winhlp32.exe">
<STYLE type="text/css">
BODY
{
Font-Size:8.25pt;
Font-Weight:Bold;
Font-Family:Lucida Console;
Color:#FFFFFF;
BackGround-Color:#000000;
Margin-Top:12;
Margin-Bottom:0;
Margin-Left:10;
Margin-Right:12;
Padding-Top:0;
Padding-Bottom:0;
Padding-Left:0;
Padding-Right:0;
Text-Align:Left;
Vertical-Align:Top;
}
TD.Type1
{
Margin-Left:0;
Padding-Left:0;
}
</STYLE>
<script Language='VBSCRIPT'>
'-> Resize And Move Window
Dim Wth :Wth = int(800)
Dim Hht :Hht = int(200)
window.ResizeTo Wth, Hht
MoveTo ((Screen.Width / 2) - (Wth / 2)),((Screen.Height / 1.1) - (Hht / 1))
'-> Text Display Varible
Dim F1 :F1 = "<FONT STYLE='Font:8.25pt;Color:#FFFFFF;Font-Weight:Bold;'>"
'-> OnLoad Action
Function Window_OnLoad()
txt1.innerHTML = F1 & "*********************************************************************************************</FONT>"
txt2.innerHTML = F1 & "This Scirpt was created by Metroidn1f. (Franky Magliocco)</FONT>"
txt3.innerHTML = F1 & "*********************************************************************************************</FONT>"
call setInterval("refresh()", 300)
End Function
</SCRIPT>
<BODY Scroll='Auto'>
<!-- txt1 Display -->
<Table><TD Class='Type1'><Span ID='txt1'></Span></TD></Table>
<!-- txt2 Display -->
<CENTER><Table><TD Class='Type1'><Span ID='txt2'></Span></TD></Table></CENTER>
<!-- txt3 Display -->
<Table><TD Class='Type1'><Span ID='txt3'></Span></TD></Table>
<SCRIPT LANGUAGE="VBScript">
function getdata()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("C:\Metroidn1f Log\Log.log")
objTextFile.function refresh()
getdata = objTextFile.Readline & "<br>"
Loop
end function
Set wshshell=wscript.createobject("wscript.shell")
wshshell.run("C:\Metroidn1f Log\Log.log")
end function
document.all.upd.InnerHTML = getdata()
end function
document.write "<SPAN id='upd'>" & getdata() & "</SPAN>"
</script>
</BODY>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Script #1.Here is a video of what the HTA window that Bradley did not help me with does.
Or here is a direct link to the video on You Tube.
Script #2.Here are still pictures of the errors that I get so you don't have to watch the video.

Here is a video of what the HTA windows that Bradley helped me with does.
Or here is a direct link to the video on You Tube.