mIRC Home    About    Download    Register    News    Help

Print Thread
#89523 07/07/04 09:42 PM
Joined: Apr 2004
Posts: 66
C
Cyrex Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Apr 2004
Posts: 66
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.

#89524 07/07/04 09:46 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
#89525 07/07/04 09:53 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#89526 07/07/04 11:35 PM
Joined: Apr 2004
Posts: 66
C
Cyrex Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Apr 2004
Posts: 66
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.

#89527 07/07/04 11:40 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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

#89528 07/07/04 11:47 PM
Joined: Apr 2004
Posts: 66
C
Cyrex Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Apr 2004
Posts: 66
OK, I did manage to get it to work. It was my own fault. Sorry about that.


Link Copied to Clipboard