mIRC Homepage
Posted By: LocutusofBorg undocumented features - 15/05/03 02:43 PM
I've known about $lof for a long time, and that it's not listed in the helpfile. Now I find that /action is also not documented. Were they just missed, or left out on purpose?

LocutusofBorg
Posted By: c0ldfusi0n Re: undocumented features - 15/05/03 03:16 PM
Some command parameters are also missing, such as /alias -l
Posted By: LocutusofBorg Re: undocumented features - 15/05/03 03:23 PM
Actually - that one is covered in the information about creating aliases:

If you specify the -l switch in the alias definition, the alias becomes accessible only by commands in the same script and invisible to the command line and other scripts.

alias -l add {
%x = $1 + $2
return %x
}

LocutusofBorg
Posted By: c0ldfusi0n Re: undocumented features - 15/05/03 04:36 PM
It still should be in the /help /alias section...
Posted By: LocutusofBorg Re: undocumented features - 15/05/03 04:46 PM
Perhaps, but that's beside the point I was making. It's in there. Far as I know $lof and /action are not.
Posted By: codemastr Re: undocumented features - 15/05/03 04:58 PM
Perhaps that is because they weren't meant to be used. Perhaps $lof was something Khaled thought of then decided against, but never removed it.
Posted By: Collective Re: undocumented features - 15/05/03 05:00 PM
Quote from mIRC 5.51 versions.txt:
134.Added $file(filename).size,.mtime identifier, .mtime returns a
$ctime value indicating when the file was last modified.

Note: $lof() is supported for now but will be removed in future.


$lof(filename) was replaced by $file(filename).size (although the .size isn't needed, it will return the file size without it). $lof was left in for compatability.
Posted By: Raccoon Re: undocumented features - 15/05/03 06:52 PM
ALIAS -l is an Event Prefix, and has nothing to do with the command /Alias. /Alias -l does NOT work.

The other identifiers I know that are not listed are as follows. (from what I can recall off the top of my head) Some were removed from the help file, some never even made it in.

$colour() -- now $color()
$lof() -- now $file().size
$inpaste -- an identifier I personally asked to be added. Works in On INPUT and tells you if the text being inputted was from a paste. Compliments the $ctrlenter identifier.
$iaddress, $naddress, $raddress -- now $dns() but $iaddress is still necessary as $dns() doesn't cover that info.
$token() -- now $gettok() and friends.
$mp3() -- now $sound()
$shoe() -- now $sock()
$r() -- short for $rand()
$true, $false, $yes, $no, $cancel -- responses from various functions, similar to $null but not mentioned in the help file.
/XYZZY -- Nothing happens.
The operator !=== is also not mentioned in the help file. It stands for Not-Equals-Case-Sensitive. One might assume !== is correct, but it is not.

That's all for now, I'm sure I'll be adding more as soon as I hit post.

- Raccoon
Posted By: Online Re: undocumented features - 15/05/03 08:38 PM
That was an helpful post. Thanks! smile
Posted By: Prizm Re: undocumented features - 15/05/03 10:04 PM
heh, $shoe? I never knew about that one...
Posted By: Raccoon Re: undocumented features - 15/05/03 10:08 PM
perceptive.
At least someone reads my posts. grin
Posted By: SaX0n Re: undocumented features - 15/05/03 10:11 PM
A few more i can think of are

/setlayer
$pi
And the 'flat' style for checkboxes.
Posted By: Prizm Re: undocumented features - 15/05/03 10:14 PM
lol how did you find out about $pi? Anyway, $beta is also undocumented.
Posted By: codemastr Re: undocumented features - 15/05/03 10:29 PM
$pi is virtually useless. For whatever reason, mIRC has decided to display 21 digits for $pi. Well, $calc can't handle 21 digits. If you type $calc($pi) you can see mIRC quickly trims it to 7 digits. Meaning, if you need pi your best bet is to just do alias mypi { return 3.141593 } rather than use mIRC's built in $pi since it will make things slower since each time it is used it has to be rounded.
Posted By: Online Re: undocumented features - 15/05/03 10:47 PM
Seemingly it's still faster to let mirc round $pi than to call a custom identifier.
Posted By: codemastr Re: undocumented features - 15/05/03 10:54 PM
Well then be like all the cool people and just memorize pi! 3.14159!
Posted By: Raccoon Re: undocumented features - 16/05/03 12:32 AM
Very cool additions SaX0n and Prizm.
What does /setlayer do though, is it a draw command for picture windows?

- Raccoon
Posted By: codemastr Re: undocumented features - 16/05/03 12:47 AM
It makes a mIRC transparent
Posted By: qwerty Re: undocumented features - 16/05/03 11:02 AM
Syntax: /setlayer N [window]
N must be a number from 0 to 255. 0 is full trasparency, 255 is full opacity
The [window] parameter is optional; if not specified, /setlayer affects the main mirc window. Of course, the target window (if any) must be a desktop one.

Another useful (at least for me) undocumented identifier is $nickmode , which works exactly like $prefix, but returns the letters instead of the symbols. $evalnext(stuff,N) also works like $eval(stuff,N+1). I remember a post in the old boards talking about $eval() being buggy. Oddly enough, $evalnext() didn't have that bug (I don't remember anything about the bug anymore and maybe it's fixed by now).
Posted By: Online Re: undocumented features - 16/05/03 11:34 AM
We faced $evalnext() on this board, too smile see this thread.

And btw, /registration is also undocumented :tongue:
Posted By: netgert Re: undocumented features - 16/05/03 01:24 PM
Some other "hidden" stuff

$nopnick(#, N) - return number of non-ops on # (if N = 0) or the Nth non-op
$nvnick(#, N) - same as above, but exculeds in addition to ops voice too
Posted By: starbucks_mafia Re: undocumented features - 16/05/03 01:32 PM
Both of those identifiers are undocumented because they're deprecated in favour of $nick().
Posted By: codemastr Re: undocumented features - 16/05/03 04:53 PM
Why do you people want to use undocumented features so much? Perhaps there is a reason they are undocumented. Maybe they don't work well, maybe they will be gone in the next version. I remember when I wrote a program that used some undocumented windows functions, then when XP came out my program stopped working alltogether, why? MS decided that the undocumented function I had been using was no longer needed, so they removed it. There is generally a reason some things are documented and other things aren't. Especially when it has been brought up numerous times that these things are not documented. If Khaled wanted them in the docs, don't you think he would have done it the first 10 times these were mentioned?
Posted By: qwerty Re: undocumented features - 16/05/03 05:47 PM
If Khaled wanted them in the docs, don't you think he would have done it the first 10 times these were mentioned?

Are you sure he would do that for every case? How can you rule out the possibility that they are left out because he forgot about them, neglected them or simply didn't have enough time to polish up the documentation? There are other reasons I can think of too, but this is not the point here.

And even if it is as you say, so what? What if all this undocumented stuff is not working perfect? What if they are gone in the next ver? I don't know about you, but I'm not using mirc to control my nuclear reactor. If something breaks in the next ver, I fix it. Scripters that release their work can simply write a patch/update.

To answer your first question (although the answer should've been obvious to you), I use some undocumented features because they suit my needs and make my life easier. I believe lots of other scripters do that too. For example, should I forget about $nickmode because it's undocumented and instead write a script that parses 005 and stores that info somewhere? If you want your script to "always work" (there's no such thing anyway) don't use these features. But the fact that other people are willing to take that "risk" should not be surprising to you.
Posted By: codemastr Re: undocumented features - 16/05/03 06:39 PM
Do you honestly think he forgot about $true and $false? Maybe about half of the scripts pasted on here use those. There is no way he could have forgotten they exist.

Quote:

For example, should I forget about $nickmode because it's undocumented and instead write a script that parses 005 and stores that info somewhere?


Well thats what I did, $isupport(token), it determines if the token exists, and if it has a value the value is returned. I'd much rather use that than rely on something that may suddenly disappear.

And it isn't suprising that people use it, it's just stupid imho. Consider /setlayer. I make a script that uses setlayer. My users love it, they love that you can make it transparent, and everything. Now 6.04 comes out, and /setlayer is gone. Users complain it doesn't work anymore. I can't simply "code a workaround" because there is no workaround, the feature is gone, now I am forced to remove a popular feature of my script. I don't consider that to be a good thing.
Posted By: Anonymous Re: undocumented features - 16/05/03 07:46 PM
I parse 005 myself too .. for the same reasons .. so I wouldn't have to fix it later lol .. plus there's a lot more in 005 than just prefix & I wanted to be able to have it all.
Posted By: trenzterra Re: undocumented features - 17/05/03 08:44 AM
Anyway, of these, $* is probably one of the most useful undocumented features - which should be documented.
Posted By: neophyte Re: undocumented features - 17/05/03 11:25 AM
If that's the case, don't use anything in mIRC.

Because heaven forbid, $version might just suddenly dissapear, or $hfind, or anything else for that matter.


You do make a valid point that they may be undocumented for good reasons, yet I think you would also be a little more open minded to other possibilities, such as Khaled forgetting to put them in, or not having time to do so.

I know for sure I have a really hard time trying to remember every single detail about my script, and I also know that there are some things in my script that I purposely don't document.

Be a little more open minded smile
Posted By: Raccoon Re: undocumented features - 17/05/03 01:25 PM
Remember I posted $inpaste. It's a function that Khaled kindly implimented becasue I asked him to. It has been around since about 5.7ish and has never made the help file. I don't see $inpaste suddenly disappearing in the next version, simply because it's still undocumented. Not without taking $ctrlenter with it.

- Raccoon
Posted By: theRat Re: undocumented features - 17/05/03 01:33 PM
$inpaste
Returns $true if a user typed Control+V or Shift+Insert to paste text into an editbox, mainly useful when processing an on INPUT event. laugh

/help Other Identifiers
Posted By: Raccoon Re: undocumented features - 18/05/03 02:12 AM
touche.
*grumbles at Tjerk for not including it in the search list, or with On INPUT*

- Raccoon
© mIRC Discussion Forums