break on $iRC=SETOPTION('WrapAtEOL','on') $HABObject = createobject("HBullock.AdminObjects") if vartypename($HABObject1) <> "Object" ? "@serror" endif ; ChangeNotify test code ; Valid Filters (string containing any of the following flags separated by whitespace): ; ATTRIBUTES Any attribute change ; DIR_NAME Any directory name change ; FILE_NAME Any file name change (creating/deleting/renaming) ; LAST_WRITE Any change to a file's last write time ; SECURITY Any security descriptor change ; SIZE Any change in a file's size ;$ChangeNotify1 = $HABObject.ChangeNotify ("c:\data\scripts", 1, "FILE_NAME") ;$ChangeNotify2 = $HABObject.ChangeNotify ("c:\data\scripts", 1, "SIZE") ; ; ;$loop = 1 ;while ($loop) ; do ; $i = 1+ $i ; $result1 = $ChangeNotify1.wait(200) ; milliseconds ; $result2 = $ChangeNotify2.wait(200) ; milliseconds ; ? "Timeout: " + $i ; If $i>50 $loop=0 endif ; until $result1 <> 0 or $result2 <> 0 or $i>50 ; ; if $result1 ; ? "FILE_NAME: Something changed" ; $rc = $ChangeNotify1.reset ; ;Do Something about it... ; endif ; if $result2 ; ? "SIZE: Something changed" ; $rc = $ChangeNotify2.reset ; ;Do Something about it... ; endif ;loop $Zip1 = $HABObject.Zip("C:\Data\Download\BBchecker.zip") $num = $Zip1.numberOfMembers ? @serror ? "Num of files in archive: " + $num ? ; Output list of files in the archive ; Note the use of the "List" method to make the array. This is case sensative. $files = $Zip1.List.memberNames $x=1 for each $member in $files ? ""+ $x + ": " + $member $x = $x + 1 next ; Get a file from the archive as an object ? $file = "view.kix" $member = $Zip1.memberNamed( $file ) ? "compressionMethod = " + $member.compressionMethod ? "lastModFileDateTime = " + $member.lastModFileDateTime ? "crc32string = " + $member.crc32String ? "uncompressedSize = " + $member.uncompressedSize ? "compressedSize = " + $member.compressedSize ; Extract file to a specified location. ? $rc = $member.extractToFileNamed( "C:\Data\Scripts\PerlCtrl\objects\" + $file ) if $rc = 0 ? "Extraction was successful" else ? "Extraction Failed: $rc @serror" endif ? $Zip2 = $HABObject.Zip() $files = "C:\Data\Scripts\PerlCtrl\objects\Zip.html", "C:\Data\Scripts\PerlCtrl\objects\HABobjects2.DLL", "C:\data\scripts\[censored].kix" for each $file in $files $member = $Zip2.addFile( $file ) if $Zip2.writeToFileNamed( "C:\Data\Scripts\PerlCtrl\objects\Test.zip" ) = 0 ? "Added: " + $file endif next
Generated in 0.062 seconds in which 0.029 seconds were spent on a total of 13 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 + "