quote:
Originally posted by michaelbadichi
isnt there a foreach function (like in stl)?
That is exactly what
for (; !i.atEnd(); i.moveNext()) {}
is for.
quote:
Originally posted by michaelbadichi
anyway, readability is a matter of opinion and coding style sometimes you better split it to several statements, especially, if iteration takes more than 1 operation. you can also add comments when you split the lines (i.e: readable comments, on a per line basis with //, rather than inside the line with /* */)
I wasn't talking about splitting lines or comments. As a matter of fact, you can do all that just the same with
for() too.
And in case you meant comments about !i.atEnd() or i.moveNext(), you didn't added comments in the script for them either. If you did, I wouldn't have suggested what I suggested.
anyways...
quote:
Originally posted by michaelbadichi
but really, you are really diving into low-details, why cant you just enjoy this script as it is?
I never said I didn't enjoyed it, nor claimed it didn't work (except for that timer issue) or whatever.
I was just checking out the script to know exactly how you grabbed the font details and just wanted to give some (JScript/Plus! scripting specific) ideas/tips along the way since I was looking thru the code anyways.
---------------------
Something off-topic now:
Since you made a packet sniffer for a specific protocol message for this script, you might wanna consider changing it a bit and releasing it on its own so that people might use it as a real protocol sniffer.
You obviously already have all the needed work done, so not much needs to be changed and/or added to make something like that. Such a sniffer is asked for a lot by scripters and the only alternative scripters now have is the
Xniff ActiveX. But Xniff has some serious problems and its creator has dissapeared from Earth... so...