Windows Vista Forums

Some solutions I have constructed (HTA HTML vbScript)

  1. #1


    Benny Pedersen Guest

    Some solutions I have constructed (HTA HTML vbScript)

    <!-- 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 &amp; 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="&lt;"
    onClick="Up 000"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 001"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E001">001: 122 KB</span></
    span><br>
    <span id="L12"><span id="S002"><INPUT type="button" value="&lt;"
    onClick="Up 002"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E002">002: JPEG Image</
    span></span><br>
    <span id="L13"><span id="S003"><INPUT type="button" value="&lt;"
    onClick="Up 003"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 004"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 005"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 006"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E006">006: A</span></
    span><br>
    <span id="L17"><span id="S009"><INPUT type="button" value="&lt;"
    onClick="Up 009"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E009">009: Image</span></
    span><br>
    <span id="L18"><span id="S010"><INPUT type="button" value="&lt;"
    onClick="Up 010"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E010">010: Benny-PC\Benny</
    span></span><br>
    <span id="L19"><span id="S011"><INPUT type="button" value="&lt;"
    onClick="Up 011"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E011">011: Picture</span></
    span><br>
    <span id="L20"><span id="S019"><INPUT type="button" value="&lt;"
    onClick="Up 019"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E019">019: Unrated</span></
    span><br>
    <span id="L21"><span id="S031"><INPUT type="button" value="&lt;"
    onClick="Up 031"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E031">031: 900 x 675</span></
    span><br>
    <span id="L22"><span id="S063"><INPUT type="button" value="&lt;"
    onClick="Up 063"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 155"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 160"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E160">160: 24</span></
    span><br>
    <span id="L25"><span id="S161"><INPUT type="button" value="&lt;"
    onClick="Up 161"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E161">161: 96 dpi</span></
    span><br>
    <span id="L26"><span id="S162"><INPUT type="button" value="&lt;"
    onClick="Up 162"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E162">162: 900 pixels</
    span></span><br>
    <span id="L27"><span id="S163"><INPUT type="button" value="&lt;"
    onClick="Up 163"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E163">163: 96 dpi</span></
    span><br>
    <span id="L28"><span id="S164"><INPUT type="button" value="&lt;"
    onClick="Up 164"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E164">164: 675 pixels</
    span></span><br>
    <span id="L29"><span id="S165"><INPUT type="button" value="&lt;"
    onClick="Up 165"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E165">165: Normal</span></
    span><br>
    <span id="L30"><span id="S176"><INPUT type="button" value="&lt;"
    onClick="Up 176"><INPUT type="button" value="&gt;"
    onClick="Down"><input type="checkbox" id="E176">176: images</span></
    span><br>
    <span id="L31"><span id="S177"><INPUT type="button" value="&lt;"
    onClick="Up 177"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 178"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 180"><INPUT type="button" value="&gt;"
    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="&lt;"
    onClick="Up 186"><INPUT type="button" value="&gt;"
    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>

      My System SpecsSystem Spec

  2. #2


    Paul Randall Guest

    Re: Some solutions I have constructed (HTA HTML vbScript)


    "Benny Pedersen" <b.pedersen@xxxxxx> wrote in message
    news:1fd98074-65b0-451b-85a6-3f3785f5ab59@xxxxxx

    > <!-- Hi
    >
    > Below is a HTA Doc, which is under construction.
    > Anyhow, I think I have found some nice solutions,
    > I would like to share.
    Hi, Benny
    On my Outlook Express 6 newsgroup reader, I have serious line wrap problems
    with your post. Could you zip the file and add a .txt extension to the zip
    file, and attach it to another post?
    -Thanks
    -Paul Randall



      My System SpecsSystem Spec

  3. #3


    Benny Pedersen Guest

    Re: Some solutions I have constructed (HTA HTML vbScript)


    Ok. The below is the ZIP with the HTA file,
    and the same ZIP file but extension TXT

    http://www.fineraw.com/tmp/getExif.zip
    http://www.fineraw.com/tmp/getExif_zip.txt

    The VBS file is not included.
    And the two "zip" files above in the TMP folder will later be
    substituted with a final version,
    Maybe around here:
    http://www.elementsvillage.com/forum...078#post461078

    Benny,
    PS: The extracted Exif was made writeable in Vista, like this:
    Notice the chr(63) was one of the problems:

    Function MakeExifWriteable(byVal s)
    Dim j
    For j= 1 to Len(s)
    If Asc(Mid(s,j,1)) = 63 Then s= Left(s, j-1) & chr(0) & Mid(s, j+1)
    Next
    MakeExifWriteable= Replace(s, chr(0), "")
    End Function

    Most of the HTA was made writeable, something like this:
    "HtmToVbs.vbs" (drag and drop the HTA)

    Option Explicit
    dim fso, sArgF, oArgF, i, arr(), oNewF: i= 0
    set fso= createObject("scripting.fileSystemObject")
    sArgF= fso.GetFile(WScript.Arguments(0))
    Set oArgF= fso.OpenTextFile(sArgF, 1)

    Do Until oArgF.AtEndOfStream
    i= i +1: ReDim PreServe arr(i): arr(i)= oArgF.ReadLine
    arr(i)= Replace(arr(i), vbTab, string(4," "))
    arr(i)= """" & Replace(arr(i), """", """""") & """"
    Loop

    oArgF.Close: Set oArgF= Nothing
    Set oNewF= fso.OpenTextFile(sArgF & "#", 2, True)
    Set fso= Nothing

    oNewF.WriteLine "oAppF.WriteLine " & arr(1) & " & vbCrLf _"
    For i= 2 to uBound(arr) -1
    If (arr(i) = """""") Then
    oNewF.WriteLine "& vbCrLf _"
    Else
    oNewF.WriteLine "& " & arr(i) & " & vbCrLf _"
    End If
    Next
    oNewF.WriteLine "& " & arr(i)
    oNewF.Close: Set oNewF= Nothing

    ' CreateObject("WScript.Shell").Run _
    ' "C:\Windows\Pfe32.exe """ & sArgF & "#"""


    On 28 Maj, 07:05, "Paul Randall" <paul...@xxxxxx> wrote:

    > "Benny Pedersen" <b.peder...@xxxxxx> wrote in message
    >
    > news:1fd98074-65b0-451b-85a6-3f3785f5ab59@xxxxxx
    >

    > > <!-- Hi
    >

    > > Below is a HTA Doc, which is under construction.
    > > Anyhow, I think I have found some nice solutions,
    > > I would like to share.
    >
    > Hi, Benny
    > On my Outlook Express 6 newsgroup reader, I have serious line wrap problems
    > with your post. *Could you zip the file and add a .txt extension to thezip
    > file, and attach it to another post?
    > -Thanks
    > -Paul Randall

      My System SpecsSystem Spec

  4. #4


    Benny Pedersen Guest

    Re: Some solutions I have constructed (HTA HTML vbScript)


    Got the move-checkbox-vertical thing to work both
    up and down, like this:

    ONE LINE: <span id="L10"><span id="S000">
    <INPUT type="button" value="&lt;" onClick="VMove -000">
    <INPUT type="button" value="&gt;" onClick="VMove 000">
    <input type="checkbox" id="E000">000: ...SNIP...</span>
    </span><br>

    Vertical move, Sub:

    Sub VMove(x)
    If arr(10) = "" Then MakeArr()
    Dim s, i, v: v= Right("-1",(x < 0) +2)
    '* First try was: v= Left("-",("-"=Left(x,1)) +1) & 1
    x= Right("00" & abs(x), 3)
    For i= 10 to uBound(arr): If x = arr(i) Then Exit For
    Next
    If arr(i-v) = "" Then Exit Sub
    s= Eval("L" & i).InnerHtml
    Eval("L" & i).InnerHtml= Eval("L" & i-v).InnerHtml
    Eval("L" & i -v).InnerHtml= s
    arr(i)= arr(i-v): arr(i-v)= x
    End Sub

    Benny,
    PS: benny.pedersen
    + gmail.com

    On 28 Maj, 15:32, Benny Pedersen <b.peder...@xxxxxx> wrote:

    > Ok. The below is the ZIP with the HTA file,
    > and the same ZIP file but extension TXT
    >
    > http://www.fineraw.com/tmp/getExif.zip
    > http://www.fineraw.com/tmp/getExif_zip.txt
    >
    > The VBS file is not included.
    > And the two "zip" files above in the TMP folder will later be
    > substituted with a final version,
    > Maybe around here: http://www.elementsvillage.com/forum...078#post461078
    >
    > Benny,
    > PS: The extracted Exif was made writeable in Vista, like this:
    > Notice the chr(63) was one of the problems:
    >
    > Function MakeExifWriteable(byVal s)
    > Dim j
    > For j= 1 to Len(s)
    > If Asc(Mid(s,j,1)) = 63 Then s= Left(s, j-1) & chr(0) & Mid(s, j+1)
    > Next
    > MakeExifWriteable= Replace(s, chr(0), "")
    > End Function
    >
    > Most of the HTA was made writeable, something like this:
    > "HtmToVbs.vbs" (drag and drop the HTA)
    >
    > Option Explicit
    > dim fso, sArgF, oArgF, i, arr(), oNewF: i= 0
    > set fso= createObject("scripting.fileSystemObject")
    > sArgF= fso.GetFile(WScript.Arguments(0))
    > Set oArgF= fso.OpenTextFile(sArgF, 1)
    >
    > Do Until oArgF.AtEndOfStream
    > * * * * i= i +1: ReDim PreServe arr(i): arr(i)= oArgF.ReadLine
    > * * * * arr(i)= Replace(arr(i), vbTab, string(4," "))
    > * * * * arr(i)= """" & Replace(arr(i), """", """""") & """"
    > Loop
    >
    > oArgF.Close: Set oArgF= Nothing
    > Set oNewF= fso.OpenTextFile(sArgF & "#", 2, True)
    > Set fso= Nothing
    >
    > oNewF.WriteLine "oAppF.WriteLine " & arr(1) & " & vbCrLf _"
    > For i= 2 to uBound(arr) -1
    > * * * * If (arr(i) = """""") Then
    > * * * * * * * * oNewF.WriteLine "& vbCrLf _"
    > * * * * Else
    > * * * * * * * * oNewF.WriteLine "& " & arr(i) & " & vbCrLf _"
    > * * * * End If
    > Next
    > oNewF.WriteLine "& " & arr(i)
    > oNewF.Close: Set oNewF= Nothing
    >
    > ' CreateObject("WScript.Shell").Run _
    > ' "C:\Windows\Pfe32.exe """ & sArgF & "#"""
    >
    > On 28 Maj, 07:05, "Paul Randall" <paul...@xxxxxx> wrote:
    >
    >
    >

    > > "Benny Pedersen" <b.peder...@xxxxxx> wrote in message
    >

    > >news:1fd98074-65b0-451b-85a6-3f3785f5ab59@xxxxxx
    >

    > > > <!-- Hi
    >

    > > > Below is a HTA Doc, which is under construction.
    > > > Anyhow, I think I have found some nice solutions,
    > > > I would like to share.
    >

    > > Hi, Benny
    > > On my Outlook Express 6 newsgroup reader, I have serious line wrap problems
    > > with your post. *Could you zip the file and add a .txt extension to the zip
    > > file, and attach it to another post?
    > > -Thanks
    > > -Paul Randall- Skjul tekst i anførselstegn -
    >
    > - Vis tekst i anførselstegn -

      My System SpecsSystem Spec

  5. #5


    Benny Pedersen Guest

    Re: Some solutions I have constructed (HTA HTML vbScript)

    Got the move-checkbox-vertical thing to work both
    up and down, like this:

    <html><head><title>test</title>
    <HTA:APPLICATION SINGLEINSTANCE="yes" APPLICATIONNAME="test">
    </head><script language="vbScript">
    Dim arr(40)

    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)VMove-1,x End Sub:Sub Down(x)VMove 1,x End Sub
    Sub VMove(v,x)
    If arr(10) = "" Then MakeArr()
    x= Right("00" & x, 3)
    Dim i: i= 10: While x <> arr(i): i= i +1: wEnd
    If arr(i+v) = "" Then Exit Sub
    arr(i)= arr(i+v): arr(i+v)= x
    x= Eval("L" & i).InnerHtml
    Eval("L" & i).InnerHtml= Eval("L" & i+v).InnerHtml
    Eval("L" & i +v).InnerHtml= x
    End Sub

    </script>
    <body>

    <div id="L10">
    <INPUT type="button" value="U" onClick="Up 000">
    <INPUT type="button" value="D" onClick="Down 000">
    <input type="checkbox" id="E000">000</div>

    <div id="L11">
    <INPUT type="button" value="U" onClick="Up 007">
    <INPUT type="button" value="D" onClick="Down 007">
    <input type="checkbox" id="E007">007</div>

    <div id="L12">
    <INPUT type="button" value="U" onClick="Up 057">
    <INPUT type="button" value="D" onClick="Down 057">
    <input type="checkbox" id="E057">057</div>

    <div id="L13">
    <INPUT type="button" value="U" onClick="Up 112">
    <INPUT type="button" value="D" onClick="Down 112">
    <input type="checkbox" id="E112">112</div>

    <div id="L14">
    <INPUT type="button" value="U" onClick="Up 123">
    <INPUT type="button" value="D" onClick="Down 123">
    <input type="checkbox" id="E123">123</div>

    </body>
    </html>


    On 28 Maj, 15:32, Benny Pedersen <b.peder...@xxxxxx> wrote:

    > Ok. The below is the ZIP with the HTA file,
    > and the same ZIP file but extension TXT
    >
    > http://www.fineraw.com/tmp/getExif.z...etExif_zip.txt
    >
    > The VBS file is not included.
    > And the two "zip" files above in the TMP folder will later be
    > substituted with a final version,
    > Maybe around here:http://www.elementsvillage.com/forum...078#post461078
    >
    > Benny,
    > PS: The extracted Exif was made writeable in Vista, like this:
    > Notice the chr(63) was one of the problems:
    >
    > Function MakeExifWriteable(byVal s)
    > Dim j
    > For j= 1 to Len(s)
    > If Asc(Mid(s,j,1)) = 63 Then s= Left(s, j-1) & chr(0) & Mid(s, j+1)
    > Next
    > MakeExifWriteable= Replace(s, chr(0), "")
    > End Function
    >
    > Most of the HTA was made writeable, something like this:
    > "HtmToVbs.vbs" (drag and drop the HTA)
    >
    > Option Explicit
    > dim fso, sArgF, oArgF, i, arr(), oNewF: i= 0
    > set fso= createObject("scripting.fileSystemObject")
    > sArgF= fso.GetFile(WScript.Arguments(0))
    > Set oArgF= fso.OpenTextFile(sArgF, 1)
    >
    > Do Until oArgF.AtEndOfStream
    > * * * * i= i +1: ReDim PreServe arr(i): arr(i)= oArgF.ReadLine
    > * * * * arr(i)= Replace(arr(i), vbTab, string(4," "))
    > * * * * arr(i)= """" & Replace(arr(i), """", """""") & """"
    > Loop
    >
    > oArgF.Close: Set oArgF= Nothing
    > Set oNewF= fso.OpenTextFile(sArgF & "#", 2, True)
    > Set fso= Nothing
    >
    > oNewF.WriteLine "oAppF.WriteLine " & arr(1) & " & vbCrLf _"
    > For i= 2 to uBound(arr) -1
    > * * * * If (arr(i) = """""") Then
    > * * * * * * * * oNewF.WriteLine "& vbCrLf _"
    > * * * * Else
    > * * * * * * * * oNewF.WriteLine "& " & arr(i) & " & vbCrLf _"
    > * * * * End If
    > Next
    > oNewF.WriteLine "& " & arr(i)
    > oNewF.Close: Set oNewF= Nothing
    >
    > ' CreateObject("WScript.Shell").Run _
    > ' "C:\Windows\Pfe32.exe """ & sArgF & "#"""
    >
    > On 28 Maj, 07:05, "Paul Randall" <paul...@xxxxxx> wrote:
    >
    >
    >

    > > "Benny Pedersen" <b.peder...@xxxxxx> wrote in message
    >

    > >news:1fd98074-65b0-451b-85a6-3f3785f5ab59@xxxxxx
    >

    > > > <!-- Hi
    >

    > > > Below is a HTA Doc, which is under construction.
    > > > Anyhow, I think I have found some nice solutions,
    > > > I would like to share.
    >

    > > Hi, Benny
    > > On my Outlook Express 6 newsgroup reader, I have serious line wrap problems
    > > with your post. *Could you zip the file and add a .txt extension to the zip
    > > file, and attach it to another post?
    > > -Thanks
    > > -Paul Randall- Skjul tekst i anførselstegn -
    >
    > - Vis tekst i anførselstegn -

      My System SpecsSystem Spec

  6. #6


    Benny Pedersen Guest

    Re: Some solutions I have constructed (HTA HTML vbScript)

    Got the move-checkbox-vertical thing to work both
    up and down, like this:

    <html><head><title>test</title>
    <HTA:APPLICATION SINGLEINSTANCE="yes" APPLICATIONNAME="test">
    </head><script language="vbScript">
    Dim arr(40)

    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) x=Right("00"&x,3):VMove-1,x:Eval("U"&x).Select:End Sub
    Sub Down(x)x=Right("00"&x,3):VMove+1,x:Eval("D"&x).Select:End Sub
    Sub VMove(v,byVal x)
    If arr(10) = "" Then MakeArr()
    Dim i: i= 10: While x <> arr(i): i= i +1: wEnd
    If arr(i+v) = "" Then Exit Sub
    arr(i)= arr(i+v): arr(i+v)= x
    x= Eval("L" & i).InnerHtml
    Eval("L" & i).InnerHtml= Eval("L" & i+v).InnerHtml
    Eval("L" & i +v).InnerHtml= x
    End Sub

    </script>
    <body>

    <div id="L10">
    <INPUT id="U000" type="button" value="U" onClick="Up 000">
    <INPUT id="D000" type="button" value="D" onClick="Down 000">
    <input id="E000" type="checkbox">000</div>

    <div id="L11">
    <INPUT id="U007" type="button" value="U" onClick="Up 007">
    <INPUT id="D007" type="button" value="D" onClick="Down 007">
    <input id="E007" type="checkbox">007</div>

    <div id="L12">
    <INPUT id="U057" type="button" value="U" onClick="Up 057">
    <INPUT id="D057" type="button" value="D" onClick="Down 057">
    <input id="E057" type="checkbox">057</div>

    <div id="L13">
    <INPUT id="U112" type="button" value="U" onClick="Up 112">
    <INPUT id="D112" type="button" value="D" onClick="Down 112">
    <input id="E112" type="checkbox">112</div>

    <div id="L14">
    <INPUT id="U123" type="button" value="U" onClick="Up 123">
    <INPUT id="D123" type="button" value="D" onClick="Down 123">
    <input id="E123" type="checkbox">123</div>

    </body>
    </html>


    On 28 Maj, 15:32, Benny Pedersen <b.peder...@xxxxxx> wrote:

    > Ok. The below is the ZIP with the HTA file,
    > and the same ZIP file but extension TXT
    >
    > http://www.fineraw.com/tmp/getExif.z...etExif_zip.txt
    >
    > The VBS file is not included.
    > And the two "zip" files above in the TMP folder will later be
    > substituted with a final version,
    > Maybe around here:http://www.elementsvillage.com/forum...078#post461078
    >
    > Benny,
    > PS: The extracted Exif was made writeable in Vista, like this:
    > Notice the chr(63) was one of the problems:
    >
    > Function MakeExifWriteable(byVal s)
    > Dim j
    > For j= 1 to Len(s)
    > If Asc(Mid(s,j,1)) = 63 Then s= Left(s, j-1) & chr(0) & Mid(s, j+1)
    > Next
    > MakeExifWriteable= Replace(s, chr(0), "")
    > End Function
    >
    > Most of the HTA was made writeable, something like this:
    > "HtmToVbs.vbs" (drag and drop the HTA)
    >
    > Option Explicit
    > dim fso, sArgF, oArgF, i, arr(), oNewF: i= 0
    > set fso= createObject("scripting.fileSystemObject")
    > sArgF= fso.GetFile(WScript.Arguments(0))
    > Set oArgF= fso.OpenTextFile(sArgF, 1)
    >
    > Do Until oArgF.AtEndOfStream
    > * * * * i= i +1: ReDim PreServe arr(i): arr(i)= oArgF.ReadLine
    > * * * * arr(i)= Replace(arr(i), vbTab, string(4," "))
    > * * * * arr(i)= """" & Replace(arr(i), """", """""") & """"
    > Loop
    >
    > oArgF.Close: Set oArgF= Nothing
    > Set oNewF= fso.OpenTextFile(sArgF & "#", 2, True)
    > Set fso= Nothing
    >
    > oNewF.WriteLine "oAppF.WriteLine " & arr(1) & " & vbCrLf _"
    > For i= 2 to uBound(arr) -1
    > * * * * If (arr(i) = """""") Then
    > * * * * * * * * oNewF.WriteLine "& vbCrLf _"
    > * * * * Else
    > * * * * * * * * oNewF.WriteLine "& " & arr(i) & " & vbCrLf _"
    > * * * * End If
    > Next
    > oNewF.WriteLine "& " & arr(i)
    > oNewF.Close: Set oNewF= Nothing
    >
    > ' CreateObject("WScript.Shell").Run _
    > ' "C:\Windows\Pfe32.exe """ & sArgF & "#"""
    >
    > On 28 Maj, 07:05, "Paul Randall" <paul...@xxxxxx> wrote:
    >
    >
    >

    > > "Benny Pedersen" <b.peder...@xxxxxx> wrote in message
    >

    > >news:1fd98074-65b0-451b-85a6-3f3785f5ab59@xxxxxx
    >

    > > > <!-- Hi
    >

    > > > Below is a HTA Doc, which is under construction.
    > > > Anyhow, I think I have found some nice solutions,
    > > > I would like to share.
    >

    > > Hi, Benny
    > > On my Outlook Express 6 newsgroup reader, I have serious line wrap problems
    > > with your post. *Could you zip the file and add a .txt extension to the zip
    > > file, and attach it to another post?
    > > -Thanks
    > > -Paul Randall- Skjul tekst i anførselstegn -
    >
    > - Vis tekst i anførselstegn -

      My System SpecsSystem Spec


Some solutions I have constructed (HTA HTML vbScript)
Similar Threads
Thread Forum
Re: HTML & VBScript -> security problem!? VB Script
problem download HTML in VBScript VB Script
Scripting.FileSystemObject with VBScript in HTML page VB Script
HTML and VBscript printer management page VB Script
working on html objects using HTML DOM, VBscript VB Script