| Author | Topic: KEYBOARD Chr(0) & InKey() & LastKey() problem |
---|
| Damir Hodak | KEYBOARD Chr(0) & InKey() & LastKey() problem
on Tue, 25 Jul 2006 13:35:13 +0200Hi everybody
I have one more problem. In clipper I used to reset LastKey() with command
KEYBOARD Chr(0) & InKey(). In Xbase that does not work. First InKey()
function waits for a long time and second LastKey() gives back old value.
In attachment I have one sample.
Does anybody have some suggestions?
Damir TEST3.PRG |
| AUGE_OHR | Re: KEYBOARD Chr(0) & InKey() & LastKey() problem
on Tue, 25 Jul 2006 19:38:28 +0200hi,
> I have one more problem. In clipper I used to reset LastKey() with command
> KEYBOARD Chr(0) & InKey().
i cant run you sample in Cl*pper (v5.2e), i got a STACK Error Lasteky(0) ?
i did not know about KEYBOARD Chr(0) ?
did you try just KEYBOARD "" or CLEAR TYPEAHEAD ?
greetings by OHR
Jimmy |
| Damir Hodak | Re: KEYBOARD Chr(0) & InKey() & LastKey() problem
on Wed, 26 Jul 2006 14:49:56 +0200On Tue, 25 Jul 2006 19:38:28 +0200, AUGE_OHR wrote:
> hi,
>
>> I have one more problem. In clipper I used to reset LastKey() with command
>> KEYBOARD Chr(0) & InKey().
>
> i can´t run you sample in Cl*pper (v5.2e), i got a STACK Error Lasteky(0) ?
> i did not know about KEYBOARD Chr(0) ?
>
> did you try just KEYBOARD "" or CLEAR TYPEAHEAD ?
>
> greetings by OHR
> Jimmy
hi
I run my sample with not problems. I use Cl*pper (v5.2e) & RTLink v3.14B.
KEYBOARD "" and CLEAR TYPEAHEAD only clears keyboard buffers but I need to
reset value which function LastKey() return.
Damir |
| AUGE_OHR | Re: KEYBOARD Chr(0) & InKey() & LastKey() problem
on Wed, 26 Jul 2006 15:56:47 +0200hi,
> > i cant run you sample in Cl*pper (v5.2e), i got a STACK Error
Lasteky(0) ?
>
> I run my sample with not problems. I use Cl*pper (v5.2e) & RTLink v3.14B.
hehe ... i just try it again with RTLink and now it work.
funny using Blinker or Exospace will cause a STACK Error ...
still no idea how to use it in Xbase++ ... if you get no answer you have
to send your sample to Alaska and ask them. if you got a Answer please
post it here.
greetings by OHR
Jimmy |
| mark carew | Re: KEYBOARD Chr(0) & InKey() & LastKey() problem
on Thu, 27 Jul 2006 08:18:09 +1000On Tue, 25 Jul 2006 13:35:13 +0200, Damir Hodak wrote:
> Hi everybody
>
> I have one more problem. In clipper I used to reset LastKey() with command
> KEYBOARD Chr(0) & InKey(). In Xbase that does not work. First InKey()
> function waits for a long time and second LastKey() gives back old value.
> In attachment I have one sample.
>
> Does anybody have some suggestions?
>
Hi Damir,
The following function may solve your problem if it is that you have
"sticking" lastkey return problems.
If you look up lastkey it discusses appevent. This routine will clear all
pending keys in the keyboard buffer. It exhausts the buffer.
--------------------------------------------
function sysclearevents()
local nEvent
local mp1
local mp2
local oXbp
DO WHILE nEvent <> 0
nEvent := AppEvent( @mp1, @mp2, @oXbp, .01 )
enddo
*
return nil
----------------------------------------------
Regards
Mark |