From WikiChip
Difference between revisions of "mirc/identifiers/$hfind"
< mirc‎ | identifiers

(Parameters)
(Properties)
Line 18: Line 18:
  
 
== Properties ==
 
== Properties ==
* '''.data''' - instead of looking for matches against item, matches against data
+
* '''.data''' - instead of looking for matches against item, matches against data, but the item name is still returned.
  
 
== Example ==
 
== Example ==

Revision as of 12:25, 31 January 2018

$hfind Searches an hash table for the Nth item name which matches text. Returns item name.


Synopsis

$hfind(name/N, text, N, M, @window | command)

Parameters

  • name/N - the Nth hash table or the name of it
  • text - the expression to use to find a match
  • N - The Nth match, use 0 to get the total number of match or to trigger the @window | command parameter for all matches
  • M - optional, a letter indicating how to match, default to value normal text comparison (n) below:
    • n - normal text comparison
    • w - wildcard expression
    • W - hash table item/data is wildcard expression, see example below
    • r - regular expression
    • R - hash table item/data is regular expression, see example below
  • command | @win -- if you pass a @win name, the item name that matched is put in the window, otherwise mirc evaluate the command for each match, $1 can be used to access the item name

Properties

  • .data - instead of looking for matches against item, matches against data, but the item name is still returned.

Example

//hadd -m test test test | echo -a $hfind(test,test,1) | hfree test
//hadd -m test test test | hadd -m test test test1 | echo -a $hfind(test,test*,0,w) | hfree test

Compatibility

Added: mIRC v5.81
Added on: 09 Nov 2000
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also

[Expand]
v · d · e mIRC identifier list