Here's the code I'm working with :
<html>
<hta:application
applicationname="IBHTA"
singleinstance="yes"
showintaskbar="yes"
contextmenu="no"
selection="no"
scroll="no"
>
<head>
<title>
Image Selector
</title>
<style>
html, body {
background:rgb(212,208,200);
margin:5px;
}
table {
border-collapse:collapse;
vertical-align:middle;
font-family:tahoma;
text-align:center;
border-spacing:0px;
font-size:7pt;
height:100%;
width:100%;
}
td, th {
background:rgb(255,255,255);
border:1px rgb(0,0,0) solid;
font-weight:normal;
}
input.A2IB1, input.A2IB2 {
font-family:tahoma;
font-size:7pt;
height:23px;
width:75px;
}
input.A2IT1, input.A4IT1 {
font-family:tahoma;
font-size:10pt;
height:23px;
width:180px;
}
.A1, .A3, .A5, .A7, .A9 {
background:rgb(10,36,106);
color:rgb(255,255,255);
font-weight:bold;
height:1%;
}
.A2, .A4 {
height:5%;
}
.A6 {
height:20%;
}
.A8 {
height:66%;
}
.A10 {
width:85%;
}
.A1B1 {
color:rgb(255,255,255);
font-family:tahoma;
position:absolute;
font-weight:bold;
cursor:pointer;
font-size:7pt;
left:7px;
top:7px;
}
.A10A1 {
border:1px rgb(0,0,0) solid;
height:100%;
width:100%;
}
</style>
<script language="vbscript">
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
Function CEFs()
arrIDs = Array( "A1","A2","A3","A4","A5","A6","A7","A8" )
If Document.GetElementById( "A1" ).Style.Display = "none" Then
Document.GetElementById( "A1B1" ).InnerText = "[+]"
For Each oItem In arrIDs
Document.GetElementById( oItem ).Style.Display = "block"
Next
Else
Document.GetElementById( "A1B1" ).InnerText = "[–]"
For Each oItem In arrIDs
Document.GetElementById( oItem ).Style.Display = "none"
Next
End If
End Function
Function BFFr()
Dim objShell : Set objShell = CreateObject( "Shell.Application" )
Dim objBFF : Set objBFF = objShell.BrowseForFolder( 0, "Select folder:", 0, A2IT1.value )
If ( Not objBFF Is Nothing ) Then
Set objBFF = objBFF.Self
BFFr = objBFF.Path
A2IT1.value = BFFr
Window.Focus()
Else
BFFr = "."
End If
End Function
Function A4IT1OPE()
If window.event.Keycode = 13 Then
UA10()
End If
Window.Event.ReturnValue = False
Window.Focus()
End Function
Function FFsBEs( arrFilenames, arrExtensions )
I = 0
For Each strFilename In arrFilenames
strExtension = objFSO.GetExtensionName( strFilename )
strFilter = Filter( arrExtensions, strExtension, True, VBTextCompare )
strJoin = Join( strFilter )
If strJoin <> "" Then
I = I + 1
End If
Next
ReDim Preserve arrJoin( I - 1 )
I = 0
For Each strFilename In arrFilenames
strExtension = objFSO.GetExtensionName( strFilename )
strFilter = Filter( arrExtensions, strExtension, True, VBTextCompare )
strJoin = Join( strFilter )
If strJoin <> "" Then
arrJoin( I ) = strFilename
I = I + 1
End If
Next
FFsBEs = arrJoin
End Function
Function setInnerHTML( sID, sValue )
window.document.getElementById( sID ).innerHTML = window.document.getElementById( sID ).innerHTML & _
sValue
End Function
Function UA10()
Do While ( Document.GetElementById( "A10T1" ).HasChildNodes() )
Document.GetElementById( "A10T1" ).RemoveChild( Document.GetElementById( "A10T1" ).firstChild )
Loop
If ( Not objFSO.FolderExists( A2IT1.value ) ) Then
A2IT1.value = "."
End If
Set objFiles = objFSO.GetFolder( A2IT1.value ).Files
objFiles = FFsBEs( objFiles, Array( "jpg", "jpeg", "jpe", "jfif", "bmp", "dib", "gif", "png", "tif", "tiff" ) )
intFiles = UBound( objFiles ) + 1
intLimit = 10
intGrps = intFiles / intLimit : If intGrps <> Fix( intGrps ) Then intGrps = Fix( intGrps ) + 1 End If
For I = 1 To intGrps
setInnerHTML "A1a", _
"<span class=""T1Out"" onClick=""PictureFrameByPageNo '" &_
I & "','" & intLimit & "'"" id=""T1Out" & I & """><span style=""color:rgb(77,109,243);"">[</span>" &_
I & "<span style=""color:rgb(77,109,243);"">]</span></span>"
Next
I = 0
For Each oFile In CreateObject( "Scripting.FileSystemObject" ).GetFolder( A2IT1.value ).Files
I = I + 1
If I < intLimit + 1 Then
Set objRow = document.all.A10T1.InsertRow()
Set objCell = objRow.InsertCell()
objCell.Style.whiteSpace="nowrap"
objCell.Style.textAlign="center"
objCell.Style.Height = "23px"
objCell.Style.Width = "75px"
objCell.InnerHTML = "<img src=""" & oFile.Path & """ /><br/>"
Elseif I = nGrpLimit + 1 Then
Else
End If
Next
End Function
Function BFFrFFsBEs()
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
Set objFiles = objFSO.GetFolder( BFFr() ).Files
objFiles = FFsBEs( objFiles, Array( "jpg", "jpeg", "jpe", "jfif", "bmp", "dib", "gif", "png", "tif", "tiff" ) )
For Each objItem In objFiles
msgBox objItem
Next
End Function
</script>
</head>
<body>
<div class="A1B1" id="A1B1" onClick="CEFs()">
[+]
</div>
<div style="overflow:auto;">
<table>
<tr>
<th class="A1" id="A1">
BROWSE
</th>
<th class="A9" id="A9">
IMAGES
</th>
</tr>
<tr>
<td class="A2" id="A2">
<input class="A2IB1" id="A2IB1" type="button" value="Browse" onClick="BFFrFFsBEs()">
<input class="A2IB2" id="A2IB2" type="button" value="Update" onClick="UA10()">
<input class="A2IT1" id="A2IT1" type="text" onkeypress="A4IT1OPE()">
</td>
<td class="A10" id="A10" rowspan="7">
<div id="A1a">
</div>
<table id="A10T1">
</table>
</td>
</tr>
<tr>
<td class="A3" id="A3">
OUTPUT STRING ARRAY
</td>
</tr>
<tr>
<td class="A4" id="A4">
<input class="A4IT1" id="A4IT1" type="text">
</td>
</tr>
<tr>
<td class="A5" id="A5">
PROPERTIES
</td>
</tr>
<tr>
<td class="A6" id="A6">
PROPERTIES FRAME
</td>
</tr>
<tr>
<td class="A7" id="A7">
QUEUE
</td>
</tr>
<tr>
<td class="A8" id="A8">
QUEUE FRAME
</td>
</tr>
</table>
</div>
</body>
</html>
If you just save that to a ".hta" and execute it you should have a very good idea of what I'm trying to make. An "Image Selector". Something to display and select/manage images because I really hate how slow and buggy the Windows image viewers are. So I want to make my own quicker one. The only problem is I don't know how to make a specific part of this table overflow instead of resizing. If you have any tips I'd really appreciate it.
<message edited by Chuck Norris on Tuesday, February 10, 2009 5:58 AM>