|
Ron,
I've made the following changes to the script that seem to help it run a little better...
function RunScript() $strTmpName = "%temp%\temp_script.kix" if DoSave($strTmpName) $objShell = CreateObject("WScript.Shell") $strCmdLine = "%COMSPEC% /k kix32.exe " $strCmdLine = $strCmdLine + $strTmpName $nul = $objShell.Run($strCmdLine) ;Run("%COMSPEC% /k kix32.exe $strTmpName") endif endfunction
Using the Wscript.Shell command to run the temporary script allows us to keep our form running after closing the console window of the temporary script.
...more...
Function IntReadCode($strPageName,$attrib,$arrConstant,$arrValue) $strHTML = "" $strHTML = $strHTML + '? "** $strPageName Properties Page : $attrib attribute **"' + @crlf $strHTML = $strHTML + '$$objHash = CreateObject("Scripting.Dictionary")' + @crlf $i = 0 For Each $constant in $arrConstant if $constant $strHTML = $strHTML + '$$=$$objHash.Add( "$constant", $arrValue[$i])' + @crlf $i = 1 + $i endif Next $strHTML = $strHTML + '$$int$attrib = $$objItem.Get("$attrib")' + @crlf $strHTML = $strHTML + 'For Each $$Key in $$objHash.Keys' + @crlf $strHTML = $strHTML + $vbTab + 'If $$objHash[$$Key] & $$int$attrib' + @crlf $strHTML = $strHTML + $vbTab + $vbTab + '? "$$Key is enabled."' + @crlf $strHTML = $strHTML + $vbTab + 'Else' + @crlf $strHTML = $strHTML + $vbTab + $vbTab + '? "$$Key is disabled."' + @crlf $strHTML = $strHTML + $vbTab + 'EndIf' + @crlf $strHTML = $strHTML + "Next" $IntReadCode = $strHTML + @crlf EndFunction
...and...
Function ReadPropertiesSimple($strPageName,$interfaceName,$arrProp) $strHTML = "" $strHTML = $strHTML + '? "** $strPageName Properties Page : $interfaceName interface **"' + @crlf For Each $prop in $arrProp if $prop $strHTML = $strHTML + '? " $prop : " + $$objItem.$prop' + @crlf endif Next $ReadPropertiesSimple = $strHTML + @crlf EndFunction
|