<!-- Hi
Below is a HTA Doc, which is under construction.
Anyhow, I think I have found some nice solutions,
I would like to share.
E.x.:
How to change the order of a check box while the HTML is running.
How to invert any check box selected.
How to save the result to a Temp file - The button to do that is named
[Use and Exit].
(The TEMP file is overwritten also when its attribute is read-only.
The VBS file, which created the HTA file should read the check box
values from the TEMP file
- When the HTA file exit; the VBS script continues)...
How to toggle any unchecked check box, etc...
All this is shown below. Just run
Benny,
PS. The "GetExifConfig.hta" below was constructed by a VBS file, which
extracted the Exif info from a photo (file drag and drop).
The reason I included a VBS file was that the HTA can't
take arguments by drag and drop. Maybe [GetExifConfig.hta#something]
would work but then we would also have to know how the HTA could
extract the #something,
and I'm not sure it would be possible.
The whole project will later be written in the photoshop forum (see my
Homepage for urls).
www.fineraw.com
Any ideas about how to make the below HTA file less size is welcome.
-->
<html><head><title>GetExifConfig.hta</title>
<HTA:APPLICATION SINGLEINSTANCE="yes"
APPLICATIONNAME="GetExifConfig"></head>
<style>
body{font-family:Verdana;font-size:10pt;background-Color:#f6f6f6;}
..btn{font-family:Verdana;font-size:8pt;width:112px;}
</style><script language="vbScript">
Dim arr(40), iGloVis: iGloVis= 8
Sub SaveConfig() Dim s, i, j
If C1.Checked Then s= "Exif from files" & vbCrLf
If C2.Checked Then s= s & "Write text file" & vbCrLf
For i= 0 To 255
j= "E" & Right("00" & i, 3)
On Error Resume Next
If Eval(j).Checked Then If (Err.Number = 0) Then s= s & j & ", " &
vbCrLf
On Error Goto 0
Next
Dim oTmpF, sTmpF, fso: Set fso= createObject
("scripting.fileSystemObject")
sTmpF= fso.getSpecialFolder(2) & "\GetExifConfig.tmp"
If fso.FileExists(sTmpF) Then
Set oTmpF= fso.GetFile(sTmpF)
If oTmpF.attributes and 1 Then oTmpF.attributes= oTmpF.attributes
-1
If s = "" Then oTmpF.Delete
End If
If (Not s = "") Then
Set oTmpF= fso.openTextFile(sTmpF, 2, True)
oTmpF.Write s: oTmpF.Close
End If
Set oTmpF= Nothing: Set fso= Nothing
Self.Close
End Sub
Sub Profile(byVal s)
Dim i, j, ArrP: If (iGloVis = 1) Then ToggleHideUnChk()
On Error Resume Next
For i= 0 To 255: j= "E" & Right("00" & i, 3): Eval(j).Checked= False
Next
ArrP= Split(Trim(s),Chr(32))
For i= 0 To uBound(ArrP)
j= "E" & Right("00" & ArrP(i), 3): Eval(j).Checked= True
Next
On Error Goto 0
End Sub
Sub ToggleHideUnChk()
Dim i, j
On Error Resume Next
For i= 0 To 255
j= Right("00" & i, 3)
If (Not Eval("E" & j).Checked) Then Eval("S" &
j).Style.Visibility= Mid("VisibleHidden",iGloVis,7)
Next
On Error Goto 0
iGloVis= Abs(iGloVis -9)
End Sub
Sub Invert()
Dim i, j: If (iGloVis = 1) Then ToggleHideUnChk()
On Error Resume Next
For i= 0 To 255
j= Right("00" & i, 3): Eval("E" & j).Checked= (Not Eval("E" &
j).Checked)
Next
On Error Goto 0
End Sub
Sub MakeArr()
Dim j, i, L: L= 9
For i= 0 To 255
j= Right("00" & i, 3)
On Error Resume Next
If (Eval("E" & j).Checked +2) Then If (Err.Number = 0) Then L= L
+1: arr(L)= j
On Error Goto 0
Next
End Sub
Sub Up(x)
If arr(10) = "" Then MakeArr()
x= Right("00" & x, 3)
Dim s, i
For i= 10 to uBound(arr): If x = arr(i) Then Exit For
Next
If i = 10 Then Down(): Exit Sub
s= Eval("L" & i).InnerHtml
Eval("L" & i).InnerHtml= Eval("L" & i-1).InnerHtml
Eval("L" & i -1).InnerHtml= s
arr(i)= arr(i-1): arr(i-1)= x
' ConfigureArea.Value= Join(arr)
End Sub
Sub Down()
MsgBox "Under Construction", 4096
End Sub
</script><body>
<INPUT class="btn" type="button" value="Refresh"
onclick="Location.Reload(True)">
<INPUT class="btn" type="button" value="Profile 1" onClick='Profile
"30 233 31 1 161 230 231 235 12"'>
<INPUT class="btn" type="button" value="Hide/Show UnChk"
onClick="ToggleHideUnChk">
<INPUT class="btn" type="button" value="Invert" onClick="Invert">
<INPUT class="btn" type="button" value="Use & Exit"
onClick="SaveConfig"><p>
<input type="checkbox" id="C1"> Exif from other photos<br>
<input type="checkbox" id="C2"> Write text file<HR>
<nobr>
<span id="L10"><span id="S000"><INPUT type="button" value="<"
onClick="Up 000"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E000">000:
a_040811_165510_web.jpg</span></span><br>
<span id="L11"><span id="S001"><INPUT type="button" value="<"
onClick="Up 001"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E001">001: 122 KB</span></
span><br>
<span id="L12"><span id="S002"><INPUT type="button" value="<"
onClick="Up 002"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E002">002: JPEG Image</
span></span><br>
<span id="L13"><span id="S003"><INPUT type="button" value="<"
onClick="Up 003"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E003">003: 18-05-2008 10:00</
span></span><br>
<span id="L14"><span id="S004"><INPUT type="button" value="<"
onClick="Up 004"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E004">004: 09-04-2009 23:34</
span></span><br>
<span id="L15"><span id="S005"><INPUT type="button" value="<"
onClick="Up 005"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E005">005: 09-04-2009 23:34</
span></span><br>
<span id="L16"><span id="S006"><INPUT type="button" value="<"
onClick="Up 006"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E006">006: A</span></
span><br>
<span id="L17"><span id="S009"><INPUT type="button" value="<"
onClick="Up 009"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E009">009: Image</span></
span><br>
<span id="L18"><span id="S010"><INPUT type="button" value="<"
onClick="Up 010"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E010">010: Benny-PC\Benny</
span></span><br>
<span id="L19"><span id="S011"><INPUT type="button" value="<"
onClick="Up 011"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E011">011: Picture</span></
span><br>
<span id="L20"><span id="S019"><INPUT type="button" value="<"
onClick="Up 019"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E019">019: Unrated</span></
span><br>
<span id="L21"><span id="S031"><INPUT type="button" value="<"
onClick="Up 031"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E031">031: 900 x 675</span></
span><br>
<span id="L22"><span id="S063"><INPUT type="button" value="<"
onClick="Up 063"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E063">063: BENNY-PC (this
computer)</span></span><br>
<span id="L23"><span id="S155"><INPUT type="button" value="<"
onClick="Up 155"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E155">155:
a_040811_165510_web.jpg</span></span><br>
<span id="L24"><span id="S160"><INPUT type="button" value="<"
onClick="Up 160"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E160">160: 24</span></
span><br>
<span id="L25"><span id="S161"><INPUT type="button" value="<"
onClick="Up 161"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E161">161: 96 dpi</span></
span><br>
<span id="L26"><span id="S162"><INPUT type="button" value="<"
onClick="Up 162"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E162">162: 900 pixels</
span></span><br>
<span id="L27"><span id="S163"><INPUT type="button" value="<"
onClick="Up 163"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E163">163: 96 dpi</span></
span><br>
<span id="L28"><span id="S164"><INPUT type="button" value="<"
onClick="Up 164"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E164">164: 675 pixels</
span></span><br>
<span id="L29"><span id="S165"><INPUT type="button" value="<"
onClick="Up 165"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E165">165: Normal</span></
span><br>
<span id="L30"><span id="S176"><INPUT type="button" value="<"
onClick="Up 176"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E176">176: images</span></
span><br>
<span id="L31"><span id="S177"><INPUT type="button" value="<"
onClick="Up 177"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E177">177: R:\Documents\Doc
\www.fineraw.com\images</span></span><br>
<span id="L32"><span id="S178"><INPUT type="button" value="<"
onClick="Up 178"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E178">178: images (R:
\Documents\Doc\www.fineraw.com)</span></span><br>
<span id="L33"><span id="S180"><INPUT type="button" value="<"
onClick="Up 180"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E180">180: R:\Documents\Doc
\
www.fineraw.com\ SNIP</span></span><br>
<span id="L34"><span id="S186"><INPUT type="button" value="<"
onClick="Up 186"><INPUT type="button" value=">"
onClick="Down"><input type="checkbox" id="E186">186: Unresolved</
span></span><br>
</nobr>
<!-- p><textarea name="ConfigureArea" rows="12" cols="64"></textarea --
</body><script language="JavaScript">window.resizeTo
(640,840);window.moveTo(0,0);</script></html>