It allows someone to right-click the window and set it to Desktop. Without -D, Desktop is always disabled by default. So always use -D unless you're lazy or it's hidden.
When I post "Comment Reserved" that means I may edit and use the top-comment for updates and the like. I post that on all my snippets. Edit: Seems new threaded comments are posted in reverse order these days, so it may be obsolete behavior now.
/help /window -- You can use the -D switch on just about any custom /window to provide greater flexibility to the user. There is never a situation when you shouldn't use -D.
Also, you can change '-aeDz' to '-h' if you don't want to see the window.
Creating hash tables in place of global variables, even single infrequently used ones? I don't like this idea, even if there are 3 or 4 cpu cycles saved. In the long run it's sloppy (to me), and harder for newbies to work with.
I'd stick with the global variable /sets, changing them to /set -e (unsets when client is closed), and check if the variable has been initialized yet. Such that a version reply is selected at random the first time you are /ctcp versioned, and the same reply is sent for the entire session of multiple version requests.
Sending a different reply seconds apart will only prove you're faking it.
Looks like a lot of nice work. I'm going to test this one tomorrow. Though, it appears the bottom of the script might be cut off... at least a closing } anyway.
Oh Wow. Yeah, AHK is much more capable than this. For starters, you could reuse most of that code by letting each 'hotkey' fall-through to the next. But ultimately a key logger in AHK is no more than 5 to 15 lines, natively or by cheating with WinAPI hooks.
SunnyD: don't blame AHK. It's really much more elegant.
I have never tested this script or any version of AutoHotkey on Windows 7. You may have to run it as Administrator for it to poke at other processes' window properties.
Whole thing has been re-arranged to a simple inline structure, and stripped and reduced the overly wordy commenting. Also fixed a bug with the flood prevention, and added awareness for other higher-than op modes.
Bizarre. I just noticed in all the time I've had this script up (and everyone who's commented positively on it), I only have 3 reviews for an average of score of 2.7 of 10. If you're one of the dozens of people who use, like, praised or have joined my channel asking for features to customize it, might I suggest a rating of "10 (Best)"? ^_^ Thanks.
I would never post a script open to the public that didn't educate the user about how it works, line by line, to teach them how to script and to protect them from rogue code. It is my intention to make this a common practice to the point where users demand it or find someone else's script, or better yet, write their own from the knowledge gleaned by cleverly crafted and commented example.
gooshie: Indeed, for two different cases. $0 indicates that parameters have been passed, so display the error message along with the help. Otherwise, no parameters have been passed... so just display the help (no error).
gooshie: Interesting find. I'll have to fix that. It -should- be passing the variable contained string as the first parameter of the identifier ($camel) and not as a naked string across parameters. Oops. :)
Hmm. When I test it, I get only the first letter colorized with color 1, then the rest of the word colorized with color 2. Similar to Title Case pattern. Not sure if that's what you intended; your description doesn't mention it. It also appears to be limited to 2 colors only (with or without a .prop set).
//echo -a $hue(%fox) The quick brown fox
What does line 3 do? while %i < $0 { inc %i | %m = %m $+ $chr(44) $($ $+ %i,2) }
It makes %m = , The quick brown fox
This is because $1 = The quick brown fox... not $1 $2 $3 $4, since the string is passed via identifier.
I'd also suggest that, since this function only takes a single parameter with use of .properties, and the ability to set those properties via global variable, it could also work as an alias /hue <string>. That way you can easily use it in the channel, even if the string contains commas. This can be done with use of $isid. Eg: