Anonymous user
Keyboard input/Obtain a Y or N response: Difference between revisions
Keyboard input/Obtain a Y or N response (view source)
Revision as of 03:44, 12 February 2011
, 13 years ago→{{header|AutoHotkey}}
Line 18:
end loop;
end Yes_Or_No;</lang>
=={{header|AutoHotkey}}==
<lang AutoHotkey>#NoEnv ; Recommended for increased performance
Input, Response,,,y,n
; Waits until they press y or n, storing all characters.
StringRight, Out, Response, 1
; retrieves the ending character (which will be y or n)
Msgbox %out%
If (Out = "y")
Msgbox You pressed Y
If (Out = "n")
Msgbox You pressed n
ExitApp
</lang>
=={{header|BASIC}}==
|