mIRC Home    About    Download    Register    News    Help

Print Thread
#15243 14/03/03 01:46 AM
Joined: Mar 2003
Posts: 7
X
XiXaQ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
X
Joined: Mar 2003
Posts: 7
Hey people.

I've been using mIRC for a long time, and I love it. However, I find that the script language is missing something.. I often use hash tables with alot of items, and I use a script to loop through it. However, a loop like this one;

while (%i < $hget(htable,0).data) {
inc %i 1
echo -a $hget(hTable,%i)
}

will halt mIRC untill %i equals the number of items in htable. This is ok if the hash table only contains 10-100 items, but when the table grows...

Visual Basic has a DoEvents keyword, which will give other applications time in each loop. I'd love it if you could implement such a feature for mIRC, giving other scripts cycles in a loop, like this;

while (%i < $hget(htable,0).data) {
inc %i 1
echo -a $hget(hTable,%i)
DoEvents
}


Thanks
XiXaQ

Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
first way is optimizing code:

var %i, %j = $hget(htable,0).data
while (%i < %j) {
inc %i
echo -a $hget(hTable,%i)
}

Second, you could create alias which loops trough some of the stuff, starts timer which calls alias again with 0,1s delay, and continues from last time and so on until everything is done, of course this will look ugly, but it wouldn't prevent other scripts so much...


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Mar 2003
Posts: 3
P
Self-satisified door
Offline
Self-satisified door
P
Joined: Mar 2003
Posts: 3
Hello XiXaO

I have a similar problem and am looking for a solution like you do.
Seems that is really a missing function in mIRC.

Therefore I support the motion to this new feature.

In case Khaled doesn't know VB, but Delphi (my "motherlanguage" grin): There would be the equivalent the "Application.ProcessMessages" method.

I really would LOVE to see this function in 6.04 grin

Regards
Paule


Link Copied to Clipboard