Syntax: %yesno(message,button1,button2...)

Displays message returns true or false depending upon which button is clicked. See #YESNO for more options. If more than two buttons are displayed, the result is the button number, making this useful in conjunction with #CASE. With only two buttons, 0 or 1 is returned, making this useful in conjunction with #IF.


#IF (%yesno("Do you really want to quit now?")) {quit} {resume}
displays a dialog with a 'Yes', a 'No', and a 'x' (Cancel) button. Only if 'Yes' is clicked, the quit command will be sent to the server. Otherwise 'resume' is sent to the server.

Local Variables were added to TeSSH after the %yesno function was initially developed, you can not use them was follows:

$tmp = 0
#if (%yesno("Yes or no?")) {$tmp = 1} {$tmp = 2}
#print {The value of tmp is $tmp}

Add comment

Login or register to post comments