mIRC Homepage
Posted By: WideOpenSpace $input help - 10/08/07 09:54 PM
i need someone to bit help me with this command since it is
poorely described in help...

id like to know (since i work with dialogs)
how to invoke input dialog that gives YES and NO button
and if i click YES that script goes in one subroutine and if i click NO that script goes to another subroutine (and not just to halt the operation)
Posted By: SladeKraven Re: $input help - 10/08/07 09:59 PM
Code:
//echo -a $iif($$input(...,y,...) == $true,Yes,No)
Posted By: WideOpenSpace Re: $input help - 10/08/07 10:17 PM
so if i am to do dialog operations then i would do like this?

Code:
//echo -a $iif($$input(...,y,...) == $true,did -a $dname ID Yes, did -a $dname ID No)
Posted By: SladeKraven Re: $input help - 10/08/07 10:33 PM
Well, it makes no sense having two /did commands, just have one and use $iif to return Yes or No.

Code:
did -a $dname ID $iif($$input(...,y,...) == $true,Yes,No)
Posted By: Horstl Re: $input help - 10/08/07 10:34 PM
Code:
did -a $dname ID $iif($input(...,y,...) == $true,Yes,No)
Note that there is always the "close box" returning $false
Posted By: WideOpenSpace Re: $input help - 10/08/07 10:42 PM
now i dont understand nothing :P

i wanted to know if $input can do this:

if pressed YES go some shit
if pressed NO do another shit

:P

but not that it only works for YES and stops for NO
Posted By: Horstl Re: $input help - 10/08/07 10:53 PM
Code:
var %input = $$input(...,y,...)
if (%input == $true) { do yes stuff }
else { do no/cancel stuff }

or
Code:
$iif(($$input(...,y,...) == $true),do yes stuff,do no/cancel stuff)


If your subroutines are comprehensive, use for example
- the %var thing (store the decision for later reference)
- use goto
- trigger separate aliases (like the $iif thing)
Posted By: SladeKraven Re: $input help - 10/08/07 11:07 PM
Or $!. smile

Code:
  noop $$input(...,y,...)
  if ($!) { echo -a Yes }
  else { echo -a No }
Posted By: WideOpenSpace Re: $input help - 11/08/07 12:00 AM
sweet, thanks all smile
Posted By: hixxy Re: $input help - 11/08/07 12:10 PM
Originally Posted By: SladeKraven
Code:
//echo -a $iif($$input(...,y,...) == $true,Yes,No)


In case you're interested, another way of doing this would be to use the 'v' flag and $mid:

Code:
//echo -a $mid($input(...,yv,...),2)


'v' makes the input dialog return $yes or $no
Posted By: SladeKraven Re: $input help - 11/08/07 06:35 PM
True, I forgot about that.
© mIRC Discussion Forums