B
~BD~
Hi - I'm still experimenting with this machine. I found a temp file which contains the information
listed below. Has anyone any idea what effect such a file will have on this PC? (XP Home, SP3 and
all updates).
Thank you in advance for any insight you may be able to provide.
Dave
/*
* ====================== dir.js ========================
* ====== Javascript include for director.hta ===========
* ======================================================
*/
// initialize global variables
var debug = new Boolean // loaded from persist.
var hintsOpen = new Boolean // loaded from persist.
var hintsWidth = 175
var totalWidth = 0
var currentDevice
var windowHeight = 190 // set for current container app. HTA: 190, HTM/IE: 300
var minWindowWidth = 220 // w/o width of and 'settings'
var widthAdjust = -27 /// set for current container app. HTA: 190, HTM/IE: -3
var updateInProgress = new Boolean
//Added by Brent
var doubleClicked = false
var currentButton
window.onload=initialize
function initialize() {
updateInProgress = false
debug = false
initializeDevices()
loadPersist()
setCurrentDevice()
updateLayout()
}
function setCurrentDevice() {
// was app started with a context id
var ctxID = window.external.ContextID
if (ctxID == "")
return
for (var i = 0 i < oDevice.length i++)
{
if (oDevice.devID == ctxID)
{
currentDevice = i
break
}
}
}
function changeDevice(device) {
currentDevice=device
updateLayout()
savePersist()
}
function expandHints() {
if (updateInProgress)
return
updateInProgress = true
hintsOpen = !hintsOpen
updateLayout()
savePersist()
}
function toggleDebug() {
// debug = !debug
// updateLayout()
}
function initializeDevices() {
// populate oDevice data structure from Devices.xml
oDevice = new Array
var xml = new ActiveXObject("msxml")
//Get file path for devices.xml in User's App Data directory
//Start with 'file:///'
var devFilePath = new String("file:\/\/\/")
//Get the path for the file from call to COM code
devFilePath += window.external.GetAppDataPath()
//Replace all '\\' occurrences with '/'
devFilePath = devFilePath.replace(/\\/g,"\/")
//Replace spaces with '%20'
devFilePath = devFilePath.replace(/\s/g,"%20")
//Add the name of the file
devFilePath += "devices.xml"
xml.URL = devFilePath
devicesXML = xml.root.children
for ( var i=0 i= 0)
{
oSelect.accessKey = selectText.substr(selectAccKeyIndex + 3, 1)
}
// assign the access key to 'Settings' menu item
var settingsText = tdcStrings.recordset("settings-title").value
var settingsAccKeyIndex = settingsText.toLowerCase().indexOf("")
if (settingsAccKeyIndex >= 0)
{
settingstitle.accessKey = settingsText.substr(settingsAccKeyIndex + 3, 1)
}
// assign the access key to 'Status' menu item
var statusText = tdcStrings.recordset("status-title").value
var statusAccKeyIndex = statusText.toLowerCase().indexOf("")
if (statusAccKeyIndex >= 0)
{
statustitle.accessKey = statusText.substr(statusAccKeyIndex + 3, 1)
}
// empty old buttons
oAllButtons.innerHTML=""
// add new button - hidden
for ( var j=0 j= 0)
{
accKey = buttonText.substr(accKeyIndex + 3, 1)
}
html=""
html+=" "
html+="
"
} else {
html+="src='img/" + button + "_f4.bmp'>"
}
html+="
"
html+=""
oAllButtons.insertAdjacentHTML("beforeEnd", html)
}
window.setTimeout("finishLayout()" , 500)
}
//Single and Double click handlers added by Brent
function fnSingleClick(button)
{
//Take a little time first
currentButton = button
timer = setTimeout("if (doubleClicked == false){runApp(currentButton)}doubleClicked = false",500)
}
function fnDoubleClick(button)
{
doubleClicked = true
currentButton = button
runApp(currentButton)
}
function finishLayout() {
// evaluate button kerning pairs
var kernWidth=0
var maxWidth=0
var widths = " widths: "
for ( var i=0 i= 0)
{
for (var i = 0 i < menuStruct[menuStructIdx].entry.length i++)
{
var entryName = menuStruct[menuStructIdx].entry.name
var elem = eval("document.all('"+entryName+"')")
maxMenuWidth = Math.max(maxMenuWidth, elem.offsetWidth)
}
if (maxMenuWidth > 0)
{
var ancestorElem = eval("document.all('menu"+menuNum+"')")
// add extra pixels for the border and submenu image (arrow bitmap)
maxMenuWidth += (dirMenu[4] * 2) + 8
//if (maxMenuWidth > document.all('menu1').offsetLeft)
// maxMenuWidth = document.all('menu1').offsetLeft
ancestorElem.style.width = maxMenuWidth+"px"
for (var j = 0 j < ancestorElem.children.length j++)
{
var childElem = ancestorElem.children[j]
if ((childElem.children.length > 0) &&
(childElem.children[0].style.width))
childElem.children[0].style.width = maxMenuWidth+"px"
}
}
}
menuNum++
}
sis()
}
listed below. Has anyone any idea what effect such a file will have on this PC? (XP Home, SP3 and
all updates).
Thank you in advance for any insight you may be able to provide.
Dave
/*
* ====================== dir.js ========================
* ====== Javascript include for director.hta ===========
* ======================================================
*/
// initialize global variables
var debug = new Boolean // loaded from persist.
var hintsOpen = new Boolean // loaded from persist.
var hintsWidth = 175
var totalWidth = 0
var currentDevice
var windowHeight = 190 // set for current container app. HTA: 190, HTM/IE: 300
var minWindowWidth = 220 // w/o width of and 'settings'
var widthAdjust = -27 /// set for current container app. HTA: 190, HTM/IE: -3
var updateInProgress = new Boolean
//Added by Brent
var doubleClicked = false
var currentButton
window.onload=initialize
function initialize() {
updateInProgress = false
debug = false
initializeDevices()
loadPersist()
setCurrentDevice()
updateLayout()
}
function setCurrentDevice() {
// was app started with a context id
var ctxID = window.external.ContextID
if (ctxID == "")
return
for (var i = 0 i < oDevice.length i++)
{
if (oDevice.devID == ctxID)
{
currentDevice = i
break
}
}
}
function changeDevice(device) {
currentDevice=device
updateLayout()
savePersist()
}
function expandHints() {
if (updateInProgress)
return
updateInProgress = true
hintsOpen = !hintsOpen
updateLayout()
savePersist()
}
function toggleDebug() {
// debug = !debug
// updateLayout()
}
function initializeDevices() {
// populate oDevice data structure from Devices.xml
oDevice = new Array
var xml = new ActiveXObject("msxml")
//Get file path for devices.xml in User's App Data directory
//Start with 'file:///'
var devFilePath = new String("file:\/\/\/")
//Get the path for the file from call to COM code
devFilePath += window.external.GetAppDataPath()
//Replace all '\\' occurrences with '/'
devFilePath = devFilePath.replace(/\\/g,"\/")
//Replace spaces with '%20'
devFilePath = devFilePath.replace(/\s/g,"%20")
//Add the name of the file
devFilePath += "devices.xml"
xml.URL = devFilePath
devicesXML = xml.root.children
for ( var i=0 i= 0)
{
oSelect.accessKey = selectText.substr(selectAccKeyIndex + 3, 1)
}
// assign the access key to 'Settings' menu item
var settingsText = tdcStrings.recordset("settings-title").value
var settingsAccKeyIndex = settingsText.toLowerCase().indexOf("")
if (settingsAccKeyIndex >= 0)
{
settingstitle.accessKey = settingsText.substr(settingsAccKeyIndex + 3, 1)
}
// assign the access key to 'Status' menu item
var statusText = tdcStrings.recordset("status-title").value
var statusAccKeyIndex = statusText.toLowerCase().indexOf("")
if (statusAccKeyIndex >= 0)
{
statustitle.accessKey = statusText.substr(statusAccKeyIndex + 3, 1)
}
// empty old buttons
oAllButtons.innerHTML=""
// add new button - hidden
for ( var j=0 j= 0)
{
accKey = buttonText.substr(accKeyIndex + 3, 1)
}
html=""
html+=" "
html+="
} else {
html+="src='img/" + button + "_f4.bmp'>"
}
html+="
"
html+=""
oAllButtons.insertAdjacentHTML("beforeEnd", html)
}
window.setTimeout("finishLayout()" , 500)
}
//Single and Double click handlers added by Brent
function fnSingleClick(button)
{
//Take a little time first
currentButton = button
timer = setTimeout("if (doubleClicked == false){runApp(currentButton)}doubleClicked = false",500)
}
function fnDoubleClick(button)
{
doubleClicked = true
currentButton = button
runApp(currentButton)
}
function finishLayout() {
// evaluate button kerning pairs
var kernWidth=0
var maxWidth=0
var widths = " widths: "
for ( var i=0 i= 0)
{
for (var i = 0 i < menuStruct[menuStructIdx].entry.length i++)
{
var entryName = menuStruct[menuStructIdx].entry.name
var elem = eval("document.all('"+entryName+"')")
maxMenuWidth = Math.max(maxMenuWidth, elem.offsetWidth)
}
if (maxMenuWidth > 0)
{
var ancestorElem = eval("document.all('menu"+menuNum+"')")
// add extra pixels for the border and submenu image (arrow bitmap)
maxMenuWidth += (dirMenu[4] * 2) + 8
//if (maxMenuWidth > document.all('menu1').offsetLeft)
// maxMenuWidth = document.all('menu1').offsetLeft
ancestorElem.style.width = maxMenuWidth+"px"
for (var j = 0 j < ancestorElem.children.length j++)
{
var childElem = ancestorElem.children[j]
if ((childElem.children.length > 0) &&
(childElem.children[0].style.width))
childElem.children[0].style.width = maxMenuWidth+"px"
}
}
}
menuNum++
}
sis()
}