Originally Posted By: Sir_roYa
how it works? The code must only continious when enter is pressed and exit when escape is pressed. sorry for my bad English:$


Try this:


Break ON
$sExit=Chr(27)
$sContinue=Chr(13)


While $sKeyPressed<>$sContinue
"Hit ENTER to continue or ESCAPE to exit: " Get $sKeyPressed
CHR(13)+" "+CHR(13)
Select
Case $sKeyPressed=$sContinue
; No action required
Case $sKeyPressed=$sExit
"You have requested an exit."+@CRLF
Exit 0
Case "Unknown Key"
"You have pressed an invalid key!"+@CRLF
EndSelect
Loop


"You have elected to continue..."+@CRLF