mIRC Home    About    Download    Register    News    Help

Print Thread
#214902 19/08/09 02:55 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
alias test  {
  var %passkeep = $$input(Do you wish to store this for future reference. $crlf Press Cancel to not be asked this again,n,pass)
  echo -a %passkeep
}

With this code (which will be part of a much larger script), I need a way to determine which of the three buttons is pressed.

For the Yes button, this is simple, as the variable becomes $true
However, for both the No and Cancel buttons, the variable returns $false

I was hoping that it would be $true, $false, and $null, however, experimentation has shown I wasn't that lucky.

If someone can determine a way of doing this, even if it means using a different method, I would appreciate hearing back asap.

RusselB #214903 19/08/09 03:02 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Use the "v" switch.

v - return $ok, $yes, $no, $cancel for buttons.

-genius_at_work

Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks


Link Copied to Clipboard