Trapping @keyB processing
J. Ryan Kelley
ryan.kelley at trinitytransport.com
Fri Oct 28 08:38:30 PDT 2005
John Esak wrote:
>>>@KEYB processing?
>>>We're running on FP 5.0.13.
>>>
>>>Thanks in advance,
>>>
>>>--
>>>J. Ryan Kelley
>>>
>>>
>>>
>>>
>>Did you see the @entsel code that Howie posted a few
>>days ago? That should work for you I think. It uses
>>@entsel and waitkey to catch all of the keystrokes. I
>>would think that you could modifiy this so that if a
>>"B" was pressed you would either do a pushkey "B" to
>>get the regular browse, or go to your own code for a
>>custom browse - depending on your variable.
>>
>>You would of course then remove your @keyb processing.
>>
>>Jeff Harrison
>>jeffaharrison at yahoo.com
>>
>>
>
>I think it would help if Jeff had tested his suggestion before suggesting
>it. It only took me 3 seconds to write this...
>
>
> then: end
>@keyB if:
> then: pushkey "B"; end
>
>to show that this would cause an infinite loop. Do NOT do this.
>
>If you want to accomplish either using the browse or not and still actually
>use the B key, you would have to intercept it and do a pushkey of the exact
>keystrokes it would take to turn on the browse at the clerk menu, then
>continue on pushing the right keys to get to the index you wanted (if that
>is the way you wanted to enter the records...) Or, have the browse on
>already and do something opposite to this.
>
>Setting a global variable as you mentioned would direct whether they would
>get your special B processing instead of the IUA browse.
>
>
>_______________________________________________
>Filepro-list mailing list
>Filepro-list at lists.celestial.com
>http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
>
>
John, I that you misunderstood Jeffs idea, he wasn't suggesting to do a
pushkey "B" in @keyB. He is suggesting to trap the B key in @entsel
processing, of course putting @keyB pushkey "B" would cause an eternal
loop, but using a waitkey in @entsel just might work....the only problem
I can forsee is that I'll have to catch every single key for which we
have processing (which is a lot), but if I put the waitkey into a
variable, zz, then if zz is not equal to 'B' I could pushkey zz....I
plan to test this out and I'll let you know what I find, the theory
seems sound though.
Thanks,
--
J. Ryan Kelley
Trinity Transport, Inc.
More information about the Filepro-list
mailing list