Advertisement
imk0tter

Untitled

Apr 21st, 2011
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.48 KB | None | 0 0
  1. alias ListTest {
  2.   var %k echo @Debug2
  3.   if !$window(@Debug) { window -e @Debug }
  4.   if !$window(@Debug2) { window -e @Debug2 }
  5.   clear @Debug2
  6.   var %x 100
  7.   var %list $List
  8.   %k Adding 100 items to list $qt(%list)
  9.   while %x {
  10.     var %obj $Class
  11.     - $Class(%obj,VAR,This is a fucking test: %x).setv
  12.     - $list(%list,%obj).add
  13.     dec %x
  14.   }
  15.   var %x 1
  16.   %k List count: $List(%list).count - Listing Items
  17.   while $List(%list,%x).get {
  18.     var %y $v1
  19.     %k Class(List(%list, $+ %x $+ ),VAR).getv = $Class(%y,VAR).getv - Count: $List(%list).count
  20.     inc %x
  21.   }
  22.   var %x $CopyObject(%list)
  23.   if %x {
  24.     %k Copied object $qt(%list) to $qt(%x) - Count: $list(%x).count
  25.     - $List(%x).delete
  26.   }
  27.   %k Exporting Object: %list
  28.   %k $iif($ExportObject(%list),Successfully exported,Failed to export) object $qt(%list)
  29.   - $List(%list,1).delete
  30.  
  31.   %k $iif($IsInstance(%list),Failed to delete,Successfully deleted) object $qt(%list)
  32.   %k $iif($ImportObject(%list),Successfully imported,Failed to import) object $qt(%list)
  33.   var %x 1
  34.   %k List count: $List(%list).count - Listing Items...
  35.   while $List(%list,%x).get {
  36.     var %y $v1
  37.     %k $!Class($List(%list, $+ %x $+ ),VAR).getv = $Class(%y,VAR).getv - Count: $List(%list).count
  38.     inc %x
  39.   }
  40.   %k Deleting List..
  41.   - $List(%list,1).delete
  42.   %k $iif($IsInstance(%list),Failed to delete,Successfully deleted) Object: %list
  43.   %k Finished list test. Handle: %list $+($chr(40),$iif($IsInstance(%list),True,False),$chr(41))
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement