Computing.Net > Forums > Programming > Show GIF progress meter in HTA

Show GIF progress meter in HTA

Reply to Message Icon

Original Message
Name: keridbey
Date: February 5, 2008 at 15:41:21 Pacific
Subject: Show GIF progress meter in HTA
OS: WinXP
CPU/Ram: 1.83 Ghz / 1 Gb
Model/Manufacturer: Dell
Comment:

I'm trying to create an HTA on a closed system (so security isn't an issue) that will ping several devices and output the results on the HTA. The actual pinging is handled by a batch file, and everything works; however, I want to display an animated GIF where the data will appear (to give the impression of a progress meter), and I'm not sure how to go about showing the GIF at the moment the button is clicked, then overwrite it with the ping results. Here's the subroutine I've cobbled together:

<script language="VBScript">
Sub DevicePing
Dim WShell
Set WShell = CreateObject("Wscript.Shell")
WShell.Run "cmd.exe /c DevicePing.cmd", 0, True
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(".\CompleteResults.txt")
strContent = objFile.ReadAll
objFile.Close
strNewText = "<span style='background-color: #FFFF00'>text</span>"
strContent = Replace(strContent, "text", strNewText)
DataArea.InnerHTML = strContent
End Sub
</script>


Report Offensive Message For Removal

Response Number 1
Name: Razor2.3
Date: February 5, 2008 at 18:15:28 Pacific
Subject: Show GIF progress meter in HTA
Reply: (edit)

What's wrong with feeding an img tag into DataArea.InnerHTML?


Report Offensive Follow Up For Removal

Response Number 2
Name: keridbey
Date: February 6, 2008 at 04:47:31 Pacific
Subject: Show GIF progress meter in HTA
Reply: (edit)

I'm still learning about HTAs, VBS, and HTML in general (trying to learn all three at once is probably silly, but I do like a challenge). Most of what I have learned has come from looking at other people's code (I'm hoping to take a class sometime this summer). What would be a good way to apply the tag so that it appears when the subroutine is called?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Show GIF progress meter in HTA

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software