It may be crap/old code, but I'm paying the bills again. Thanks!
>Glad to help, also glad to see your working again.
>
>Bob
>
>>Bingo! Thanks!!
>>
>>
>>IF LASTKEY() = 27
>> KEYBOARD '9'
>> INKEY()
>>ENDIF
>>
>>
>>
>>>Try INKEY() to consume keystrokes
>>>
>>>or SET TYPEAHEAD TO 0 to purge buffer (set it on again after :)
>>>
>>>Bob
>>>
>>>>Ok, better, but now I don't want to see a wait window. I just want to change the value of LastKey()...
>>>>
>>>>>You are resolving LastKey in the WAIT command before it has collected the keystrokes which are only consumed while waiting for input
>>>>>
>>>>>Try
>>>>>
>>>>>KEYBOARD '999' clear
>>>>>WAIT WINDOW 'WAITING'
>>>>>? LASTKEY()
>>>>>
>>>>>Bob
>>>>>
>>>>>>Nope, LastKey() value is still 27. Strange. If I use a regular WAIT WINDOW and click the mouse, then the value will change. I'm trying to make sure that at this point in code that the LastKey() value is not 27. I really don't care what it is as long as it's not 27 and not anything that causes an action to fire.
>>>>>>
>>>>>>>Hello Jay,
>>>>>>>
>>>>>>>Try taking out the NOWAIT to give the keystrokes someplace to go.
>>>>>>>
>>>>>>>Bob
>>>>>>>
>>>>>>>>If the LastKey() value before these lines was "ESC" or 27, then why on the WAIT line is it still 27? I thought the KEYBOARD command would overwrite that? Thanks!
>>>>>>>>
>>>>>>>>
>>>>>>>>KEYBOARD '999' clear
>>>>>>>>WAIT WINDOW TRANSFORM(LASTKEY()) NOWAIT
>>>>>>>>