Matt,

That's kinda what I already tried to do.

Since it wasn't working - I made a small program that just displays a
number - and allows you to hit certain keys to change the value - and
just redisplay it. But, the ON KEY LABEL thing just does NOT work - as
though it is Ignored when INKEY is running. Here is that Test Code I
created:

CLEAR 
x=5
@ 2,2 say "The Value: " + ALLTRIM(STR(x))
DO WHILE .T.
   ON KEY LABEL F12 WAIT WINDOW "OK - F12 key WAS Hit!"   
   y=INKEY(0)
   ON KEY LABEL F12 

        DO CASE 
                CASE y = 13  && Hitting ENTER Exits!
                        exit
                CASE UPPER(CHR(y)) = "W"
                        x = x + 10
                CASE UPPER(CHR(y)) = "Z"
                        x = x - 10
        ENDCASE 
        @ 2,1 clear to 3,50
        @ 2,2 say "The Value: " + ALLTRIM(STR(x))
ENDDO 
RETURN

TIA,
-K-

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of M Jarvis
Sent: Thursday, April 26, 2012 10:57 AM
To: [email protected]
Subject: Re: On Key, InKey & Getting Key Strokes...

> As such - does anyone have a suggestion. Otherwise - and I hate to do
> this - I may pull that "Browsing" procedure into the program I am
> working on - and update the procedure (maybe as a different name) -
and
> directly change that procedure to do what I want. But, was just hoping
> for a more elegant solution...
>


Depending on how you route through the PRG's to get to the one that
snags the INKEY value, maybe you could intercept that BEFORE that call
takes place. Have this new program deal with what you want from your
ON KEY stuff, if it doesn't apply to what you want to do then have
this one pass it along to the original...

Example: Your current code prolly goes something like this:

ProgramA
->ProgramB
---->Program with special stuff
-------->Your new program with ON KEY functionality

Insert your ON KEY program ahead of it:

ProgramA
->ProgramB
---->Your new program with ON KEY functionality
-------->Program with special stuff

With any luck that's one change to the caller program in ProgramB

-- 
Matt Jarvis
Eugene, Oregon USA

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/289ea162f5642645b5cf64d624c66a140e260...@us-ny-mail-002.waitex.net
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to