SladeKraven, it doesn't seem as if those posts have gotten anywhere. I don't quite understand how these commands could not seem useful to observers of these posts, whereas several scripting sites would show differently, just about all scripting help sites show a handful of sniplets that do these functions, there are tons of partially redundent commands in mirc that do far less than these commands would offer...


I'm not entirely sure why you'd rename a hash table that you created, but I suppose it's not a bad command to have.

I've given my example above however apparently alot more people than me find it useful, hence all the sniplets.

For the item names, it would just cut 2 commands down to 1 command, so I'm not sure why you'd do that.

First off, it's a little more than 2 commands if you include error checking, Secondly I just thought it was only logical to include item renaming as part of the command. But besides that some scripts might contain alot of redundant item renaming thus cutting down the script by 50% or more. I would also like to point out the commands /hinc and /hdec, for the same reasons.. These commands cut down on 2 commands as well (not to mention tons of other commands which cut down on even less). And finally the true purpose of this command is to rename an entier hash table in such cases as the example I've given above, the item renaming is just a convenient side effect.


As far as copying, that's not difficult to do without any other commands.

/hadd Table2 Item1_or_Item2 $hget(Table1,Item1).data

Same applies as above, there is also the possibility of what i call dynamic user templetes,in such case, one might want to copy entire hash tables. I could give an example but it's kinda lenghthy and might be confusing to most, so i won't bother. So anyway.. the current most common work around is to save the hash table as a file, then load into a new hash table.. This is obviously very inefficient. Also as DaveC pointed out on a previous post, this method does not work in such cases as the following:

bset &binvar 1000000 0 | hadd -mb table1 item1 &binvar
var %crlf = $crlf      | hadd -m table1 item2 %crlf
var %num = 99          | hadd -mz table1 item3 %num
var %true = $true      | hadd -mu10 table1 item4 %num

Final thought:
All in all, I just don't understand why these commands are not already added. It seems to me that they should have been there since hash tables were introduced, I mean I cannot see how /hinc and /hdec made the cut, but /hcopy and /hren aren't there or even implimented as a switch of a current command.

Hope to see these in the next version smile

mIRC Scripting: So easy a caveman could do it.