Follow-up on show only browse
Kenneth Brody
kenbrody at spamcop.net
Mon Sep 20 11:58:36 PDT 2010
On 9/20/2010 2:13 PM, Richard Kreiss wrote:
> After all the suggestions as to how to return to the original screen, my
> client asked today if their users could have the old method back. What she
> meant by that was that if the enter key was pressed the next record should
> come up with the browse open.
>
> With all the suggestions that have been made, this became a rather easy
> requested to fill. I added the following code:
>
> If:
> Then: qq=waitkey
> If: qq = "" and @sk="ENTR"
> Then: pushkey "[ENTR"]9";end
> If: qq = "" and @sk="CDWN"
> Then: pushkey "[CDWN"]9";end
> If: qq = "" and @sk="CRUP"
> Then: pushkey "[CRUP"]9";end
> If:
> Then: END
>
> The above program returns the enter up arrow and down arrow keys to their
> original function.
Note that the qq="" test on each line is unnecessary.
Also, I assume the above code is not copy-pasted from the actual code, since
your pushkeys all have the same syntax error / typo.
Next, what happens if the press something other than the three keystrokes
you check for? Your code simply throws it out, and returns to @entsel.
Finally, a common shortcut technique for such checks would be:
if: "|ENTR|CDWN|CRUP|" co ("|" & @SK & "|")
then: pushkey "[" & @SK & "]9" ; end
if: ''' None of the above.
then: ''' What should go here?
if:
then: end
--
Kenneth Brody
More information about the Filepro-list
mailing list