bsharath
asked on
Software checklist hta thats store into a ini file.
Hi,
Software checklist
I have a txt file with 1000's of software names per line. I want a hta to read from the txt file and show the names and each line should have a checkbox at the end. To select if software available or now as dump another checkbox CD and another checkbox downloadable
So 3 checkboxes and 2 buttons select all and select none.
Submit button when selected saves the selections in a ini file and when opened again gets the data from that ini and displays and again we can make any changes and submit.
regards
Sharath
Software checklist
I have a txt file with 1000's of software names per line. I want a hta to read from the txt file and show the names and each line should have a checkbox at the end. To select if software available or now as dump another checkbox CD and another checkbox downloadable
So 3 checkboxes and 2 buttons select all and select none.
Submit button when selected saves the selections in a ini file and when opened again gets the data from that ini and displays and again we can make any changes and submit.
regards
Sharath
^^^^^
+1
~bp
+1
~bp
Sharath, it's a bit unclear what you want from this, but this should be a start......it reads from applications.ini
Regards,
Rob.
Regards,
Rob.
<html>
<head>
<hta:application
ID="Software Checklist"
ApplicationName="Software Checklist"
SINGLEINSTANCE="YES"
CONTEXTMENU="NO"
MINIMIZEBUTTON="NO"
MAXIMIZEBUTTON="NO"
SCROLL="NO"
BORDER="THIN"
ICON=""
/>
<head>
<script language="vbscript">
window.resizeTo 800,600
Dim intAppCount
Sub Window_OnLoad
Set objFSO = CreateObject("Scripting.FileSystemObject")
Const intForReading = 1
If Mid(document.location, 6, 3) = "///" Then
strHTAPath = Mid(Replace(Replace(document.location, "%20", " "), "/", "\"), 9)
Else
strHTAPath = Mid(Replace(Replace(document.location, "%20", " "), "/", "\"), 6)
End If
strHTAPath = Left(strHTAPath, InStrRev(strHTAPath, "\"))
strApplications = strHTAPath & "Applications.ini"
Set objApps = objFSO.OpenTextFile(strApplications, intForReading, False)
intCurrentOption = 0
strOptions = "<table border=1><tr><th width=60%>Software Title</th><th>Available</th><th>On CD</th><th>Downloadable</th>"
While Not objApps.AtEndOfStream
strApp = Trim(objApps.ReadLine)
If strApp <> "" Then
intCurrentOption = intCurrentOption + 1
strOptions = strOptions & "<tr><td>" & strApp & "</td>" &_
"<td><input type='checkbox' id='chkAvailable' " &_
"name='chkAvailable' value='" & strApp & "' " &_
"checked=True></td>" &_
"<td><input type='checkbox' id='chkOnCD' " &_
"name='chkOnCD' value='" & strApp & "' " &_
"checked=True></td>" &_
"<td><input type='checkbox' id='chkDownloadable' " &_
"name='chkDownloadable' value='" & strApp & "' " &_
"checked=True></td></tr>"
End If
Wend
objApps.Close
strOptions = strOptions & "</table>"
DataArea.InnerHTML = strOptions
intAppCount = intCurrentOption
End Sub
Sub SelectAll
For Each objCheckBox In chkAvailable
objCheckBox.Checked = True
Next
For Each objCheckBox In chkOnCD
objCheckBox.Checked = True
Next
For Each objCheckBox In chkDownloadable
objCheckBox.Checked = True
Next
End Sub
Sub DeselectAll
For Each objCheckBox In chkAvailable
objCheckBox.Checked = False
Next
For Each objCheckBox In chkOnCD
objCheckBox.Checked = False
Next
For Each objCheckBox In chkDownloadable
objCheckBox.Checked = False
Next
End Sub
</script>
<style>
body
{
font: 10pt Arial;
background-color: buttonface;
border: none;
}
td {
font: 10pt Arial;
}
td.link {
cursor: hand;
color: blue;
width: 200px;
}
table {
margin-left: 50px;
}
</style>
</head>
<body>
<div id="DataArea"></div>
<table>
<tr>
<td width="50%">
<input type='button' value='Select All' name='btnSelectAll' onClick='vbs:SelectAll'>
</td>
<td>
<input type='button' value='Deselect All' name='btnDeselectAll' onClick='vbs:DeselectAll'>
</td>
</tr>
</table>
</body>
</html>
ASKER
Thanks Rob
Its basically going to have all the software names available in the domain.
Say we have 3000 different softwares. I will have them in the ini file. I will email this to the team and every one has a different set of softwares under their control
When i open the HTA for the first time. I will need all unchecked. And say i know that 10 software are downloadable and 5 i have the dump. Then i select this and click on Submit.
The my selection has to be saved into a file. Say another user opens the HTA he has to see my selections and then be able accept his selections and when he submits it has to be appended into the same file.
I will need the log to have the user name auto filled into the file
End of the day i will know which are all that we have the dumps available for and which we do not.
A export button please to get the hta checks and software names to a file. With the users who said they have it.
Its basically going to have all the software names available in the domain.
Say we have 3000 different softwares. I will have them in the ini file. I will email this to the team and every one has a different set of softwares under their control
When i open the HTA for the first time. I will need all unchecked. And say i know that 10 software are downloadable and 5 i have the dump. Then i select this and click on Submit.
The my selection has to be saved into a file. Say another user opens the HTA he has to see my selections and then be able accept his selections and when he submits it has to be appended into the same file.
I will need the log to have the user name auto filled into the file
End of the day i will know which are all that we have the dumps available for and which we do not.
A export button please to get the hta checks and software names to a file. With the users who said they have it.
ASKER
Hi Rob any views on this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot Rob perfect
Any help with this please...
https://www.experts-exchange.com/questions/26415576/Record-the-terminal-idle-time-if-more-than-2-hrs-for-a-bunch-of-machines.html
Any help with this please...
https://www.experts-exchange.com/questions/26415576/Record-the-terminal-idle-time-if-more-than-2-hrs-for-a-bunch-of-machines.html
Why do you start trying to solve the problem yourself and when you run into a problem, tell us the problem , give us a sample of the list, and we will answer the question.