mIRC Home    About    Download    Register    News    Help

Print Thread
#48048 08/09/03 04:03 PM
S
snabbi
snabbi
S
I'd like to have an identifier for $input.

var %i = $input("Which names",e,names,%names)
if ( %i != $null ) { set %names %i }

mirc doesn't know if you pressed the ok button or the cancel button when you typed nothing in the editbox.

When you try to delete all the names in %names, it would reject because %i = $null. If you don't use the if-statement you also save the settings when someone is pressing cancel.

#48049 08/09/03 06:09 PM
Joined: Jan 2003
Posts: 247
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 247
use $$input() instead, if the user cancels, it will stop the script (halt) at the $input request.

#48050 08/09/03 06:27 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
All it really needs is for the v switch to work so it would return $cancel instead of $null.

#48051 08/09/03 06:39 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
Problem is, when the e switch is specified, v is completely ignored, so the Cancel button returns $null instead of $cancel. I guess the feature suggestion could be "v should always make $input return $cancel when the Cancel button is clicked"

#48052 11/09/03 06:57 PM
S
snabbi
snabbi
S
yeah thnx the $$input works.
I still think the $cancel identifier should be implemented


Link Copied to Clipboard