$objDict = CreateObject("Scripting.Dictionary") DictionarySetValue($objDict,"item1","value1") DictionarySetValue($objDict,"item2","value2") DictionarySetValue($objDict,"item3","value3") ? "Amount of Items: " + $objDict.Count ? "Value of Item1: " + $objDict.item("item1") ;Enumeration of Items and Value's For Each $objItem in $objDict ? "Item: " + $objItem " contains value: " + $objDict.item($objItem) Next DictionarySetValue($objDict,"item2","value ANYTHING") ? "Value of Item2: " + $objDict.item("item2") ;Enumeration of Items and Value's For Each $objItem in $objDict ? "Item: " + $objItem " contains value: " + $objDict.item($objItem) Next
function DictionarySetValue($DictionaryObject, $key, $value) dim $sc if vartypename($DictionaryObject) <> "Object" exit 13 endif if vartypename($key) = "Empty" exit 13 endif if $DictionaryObject.Exists($key) $sc = CreateObject("ScriptControl") $sc.language = "VBScript" $sc.addobject('dict',$DictionaryObject) $sc.addcode('dict.Item("' + $key + '")="' + $value + '"') $sc.run $DictionaryObject=$sc.codeobject.dict else $DictionaryObject.Add($key, $value) endif endfunction
Generated in 0.054 seconds in which 0.023 seconds were spent on a total of 14 queries. Zlib compression enabled.
") !=-1) { tempah=tempah.substring(tempah.indexOf("")+5,tempah.indexOf("")); codes[i].innerHTML="" + dotag(tempah.substring()) + ""; } } //var pres = document.getElementsByTagName("pre"); //for (var i=0, maxi = pres.length; i < maxi; i++) { // var tempah = pres[i].innerHTML; // if (tempah.indexOf("[postprep") !=-1) { // tempah=tempah.substring((tempah.indexOf("]",tempah.indexOf("[postprep"))+1)); // pres[i].innerHTML=dotag(tempah); // } //} function ytag(which_one) { var codes = document.getElementsByClassName("ubbcode-body"); var thisone = codes[which_one].innerHTML; codes[which_one].innerHTML = "" + dotag(thisone.substring(5+thisone.indexOf(""),thisone.indexOf(""))) + ""; var heads = document.getElementsByClassName("ubbcode-header"); heads[which_one].innerHTML = "Code:" + ' '; } function ttag(which_one) { var codes = document.getElementsByClassName("ubbcode-body"); var thisone = ""; if (codes[which_one].innerText != undefined) { thisone += codes[which_one].innerText; } else { thisone += codes[which_one].textContent; } codes[which_one].innerHTML = thisone + ""; var heads = document.getElementsByClassName("ubbcode-header"); heads[which_one].innerHTML = "Code:" + ' '; }
")+5,tempah.indexOf("
" + dotag(tempah.substring()) + "
" + dotag(thisone.substring(5+thisone.indexOf(""),thisone.indexOf(""))) + "
"),thisone.indexOf("
"; if (codes[which_one].innerText != undefined) { thisone += codes[which_one].innerText; } else { thisone += codes[which_one].textContent; } codes[which_one].innerHTML = thisone + "