mIRC Homepage
Posted By: Cyrex $input bug - 07/07/04 09:42 PM
I think I may have found a bug with the $input identifier. According to the mIRC help file, it says:

Note: This identifier cannot be used in a script event. One way around this is to use a /timer to initiate an input request after the script ends.


Working $input example:

on *:START:{
.timer 1 1 $input(This is a test...,o,Test)
}

The above works fine, but if I try this example:


on *:SOCKOPEN:*:{
.timer 1 1 $input(This is a test...,o,Test)
}

mIRC will return:

-
* $input: cannot use in an event
-


Both events use the exact same code, the only difference is the events. This looks like a bug to me. I've tried the above with several events, and they all worked flawlessly. It seems that the on SOCKOPEN event is the culprit.
Posted By: KingTomato Re: $input bug - 07/07/04 09:46 PM
I noticed that also. It seems the rest let the timer evaluate when it up, but sockopen wants to pass the evaluated result of $input to the timer event.
Posted By: qwerty Re: $input bug - 07/07/04 09:53 PM
It's not a bug, you should use $!input() with /timer, to avoid its evaluation inside the script. The reason on START works is that certain events allow you to call $input() from within them, another case being the on DIALOG events.
Posted By: Cyrex Re: $input bug - 07/07/04 11:35 PM
Using $!input also does not work. mIRC still returns an error. I still think it's a bug. I'm using mIRC v6.16 by the way.
Posted By: Collective Re: $input bug - 07/07/04 11:40 PM
It works fine for me with the !...
Code:
on *:SOCKOPEN:*:{
  .timer 1 1 $!input(This is a test...,o,Test)
}

[00:39:01] $TRUE is an unknown command

mIRC 6.16
Posted By: Cyrex Re: $input bug - 07/07/04 11:47 PM
OK, I did manage to get it to work. It was my own fault. Sorry about that.
© mIRC Discussion Forums