Solved Problem

Thanks

-----Original Message-----
From: MikeB [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 30, 2005 5:22 PM
To: [email protected]
Subject: [RBG7-L] - Re: Code works once and will not work 2nd time ?


The Pause command is what is waiting for the keystroke, so your check for 
Lastkey has to be just after the Pause.  Further, it is not necessary to 
capture the Lastkey in a Variable.. run this example code ...


CLS

Write ' '
Write ' '
Write ' '
Write '   Proceedure is for deletion of all data pertaining to Allied 
Automtive'
Write ' '
Write ' '
Write '                      Do You Wish To Continue  '
Write ' '
Write ' '
Write '                 Hit any Key to Continue - ESC to Quit'
Write ' '
Write ' '
Write ' '
Write ' '

Pause
if (lastkey(0)) = '[esc]' then
   goto FINISH
endif

cls

Write ' '
Write ' '
Write '                             Are You Sure '
Write ' '
Write ' '
Write '                  Hit any Key to Continue - Esc to Quit   '
Write ' '
Write ' '
Write ' '
Write ' '

Pause

if (lastkey(0)) = '[esc]' then
    goto FINISH
endif

cls
pause 2 using 'Routine runs anyway'

return
label finish

pause 2 using 'Escape got here'

return

Reply via email to