X-Static Codes
Chat to Us @
SNM Chat
in #X-Static
Home
|
Contact
Login
Register
Search
Scripting
Snippets
Tutorials
Competitions
Links
Memberlist
Pastebin
Affiliates
Contact Admin
Sponsors
Nameless
Official #nameless website
Rooted.in
I got Rooted did you?
Stats
Total Members: 56
Newest User: Nofilicity
Snippets Added: 153
View
hash manager
Snippet Author:
threeZ
Rated:
Snippet Description:
dialog hash table manager - list what hash tables are there, what are in them and that sort of stuff
menu * { Hash Manager: if ( !$dialog(hsh) ) { dialog -md hsh hsh } } dialog hsh { title "Hash Manager" size -1 -1 231 142 option dbu list 1, 6 11 63 102, size list 2, 85 11 63 102, size edit "", 3, 162 11 63 102, read multi return autovs vsbar box "Table", 4, 3 2 73 127 box "Item", 5, 80 2 73 127 box "Data", 6, 157 2 73 127 button "New Table", 7, 6 115 30 12 button "Delete", 8, 37 115 32 12, button "Add Item", 9, 84 115 31 12, button "Delete", 10, 116 115 31 12, button "Edit Data", 11, 162 114 63 12, edit "", 12, 1 130 230 11, read center } alias refresh { if ( $1 == -a ) { did -r hsh 2,3 var %x 1 did -r hsh 1 while ( $hget(%x) ) { did -a hsh 1 $hget(%x) inc %x } } elseif ( $1 == -b ) { var %x 1 did -r hsh 2 while ($hget($did(1).seltext,%x).item) { did -a hsh 2 $hget($did(1).seltext,%x).item inc %x } did -ra hsh 12 You Are Viewing: $did(1).seltext; (Total: $did(1).lines Table(s)) } elseif ($1 == -c) { did -r hsh 3 did -a hsh 3 $hget($did(1).seltext,$did(2).seltext) } } on *:dialog:hsh:*:*: { if ( $devent == init ) { refresh -a } elseif ( $devent == sclick ) { if ( $did == 1 ) { var %x 1 did -r hsh 2 while ( $hget($did(1).seltext,%x).item ) { did -a hsh 2 $hget($did(1).seltext,%x).item inc %x } did -ra hsh 12 You Are Viewing: $did(1).seltext; (Total: $did(1).lines Table(s)) } elseif ( $did == 2 ) { did -r hsh 3 | did -ra hsh 3 $hget($did(1).seltext,$did(2).seltext) did -ra hsh 12 Table: $did(1).seltext $+ /Item: $did(2).seltext (Total: $did(1).lines Tables/ $+ $did(2).lines Items) } elseif ( $did == 7 ) { .hmake $input(Enter the hash table name you want to create,qe,Hash Table Name) 10 refresh -a } elseif ( $did == 9 ) { if ($did(1).sel) { .hadd $did(1).seltext $input(Enter item name,qe,Item Name) $input(Enter Data,qe,Date?) } refresh -b } elseif ( $did == 10 ) { if ( $did(2).sel ) { .hdel $did(1).seltext $did(2).seltext did -r hsh 3 refresh -b } } elseif ( $did == 8 ) { if ( $did(1).sel ) { if ($input(Are you sure that you want to delete $did(1).seltext,qy,Confirmation)) { .hfree $did(1).seltext refresh -a } } } elseif ( $did == 11 ) { var %x $input(Enter Data,qe,Data?,$hget($did(1).seltext,$did(2).seltext)) if ( %x ) { .hdel $did(1).seltext $did(2).seltext .hadd $did(1).seltext $did(2).seltext %x refresh -c } } } }
Favorite Script
-
Smilies
Message:
Comments: