mIRC Homepage
Posted By: snabbi identifier in $input - 08/09/03 04:03 PM
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.
Posted By: ClickHeRe Re: identifier in $input - 08/09/03 06:09 PM
use $$input() instead, if the user cancels, it will stop the script (halt) at the $input request.
Posted By: starbucks_mafia Re: identifier in $input - 08/09/03 06:27 PM
All it really needs is for the v switch to work so it would return $cancel instead of $null.
Posted By: qwerty Re: identifier in $input - 08/09/03 06:39 PM
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"
Posted By: snabbi Re: identifier in $input - 11/09/03 06:57 PM
yeah thnx the $$input works.
I still think the $cancel identifier should be implemented
© mIRC Discussion Forums