Using PFSKHEX, was The @when user key function/feature....
Bob Simcoe
bob at midcityoffice.com
Thu Oct 28 10:02:41 PDT 2010
John
I see in your later posts you mention PFSKHEX=on, I do use this also, one thing you can do with it, at least in windows, is trap the Break Key ( Ctrl-C ).
To demonstrate I create a file with 2 fields, default Screen 0, Input Processing, start in Add Records.
You'll be able to see the code for any key entered, tests for Ctrl-C, or enter data in field 1. Much fewer lines are needed if Field 1 was 1 character where no data entry was needed.
Number -------------Field Heading-------------- Len --Type--
1 - field1 ◄ 10◄ * ◄
2 - field2 ◄ 10◄ * ◄
1 ------- - - - - - - -
◄ If:
Then: end
2 ------- - - - - - - -
@wef1 ◄ If:
Then: break off 'turn break off
3 ------- - - - - - - -
◄ If: wait eq "off"
Then: end
4 ------- - - - - - - -
◄ If:
Then: show("4","9") "" 'position the waitkey cursor at field1 ( default create screen 0 )
5 ------- - - - - - - -
◄ If:
Then: aa = waitkey 'set up for waitkey
6 ------- - - - - - - -
◄ If:
Then: 1 = aa ; display 'if a non @sk, character will be displayed in field 1
7 ------- - - - - - - - - - -
◄ If:
Then: sk(4,*) = @sk
8 ------- - - - - - - - - - -
◄ If:
Then: show "@You Pressed - " < sk 'displays the hex value of any key you pressed, even non @sk
9 ------- - - - - - - - - - -
◄ If: sk eq "0003"
Then: msgbox "Break","Y or N","YN" 'testing for Break Key Ctrl-C - code 0003
10 ------- - - - - - - - - - -
◄ If: sk eq "0003" and @bk eq "Y"
Then: close ; exit
11 ------- - - - - - - - - - -
◄ If: 1 eq ""
Then: aa = "" ; sk = "" ; pushkey "[entr]" 'if it was a @sk key pass to field 2
12 ------- - - - - - - - - - - - - - -
◄ If:
Then: aa = "" ; sk = "" ; wait = "off" ; screen 0,1,"-1" 'if not a @sk, continue entering field1
13 ------- - - - - - - - - - - - - - -
◄ If:
Then: end
14 ------- - - - - - - - - - - - - - -
@wlf1 ◄ If:
Then: wait = "on"
15 ------- - - - - - - - - - - - - - -
◄ If:
Then: end
Bob Simcoe
-----Original Message-----
From: filepro-list-bounces+bob=midcityoffice.com at lists.celestial.com [mailto:filepro-list-bounces+bob=midcityoffice.com at lists.celestial.com] On Behalf Of John Esak
Sent: Thursday, October 28, 2010 9:48 AM
To: filepro-list at lists.celestial.com
Subject: RE: The @when user key function/feature....
Ok, I see now what you are doing and why.
John
> -----Original Message-----
> From: Bob Simcoe [mailto:bob at midcityoffice.com]
> Sent: Thursday, October 28, 2010 9:37 AM
> To: john at valar.com; filepro-list at lists.celestial.com
> Subject: RE: The @when user key function/feature....
>
> Reason:
> Field 1 can be more than one character long. In the example I
> used I was prompting for an Order Number, the user could
> enter the exact existing order number, if the order number
> didn't exist a browse of existing orders pops up, or the user
> could just press F6 and the @wbl1 processing starts a browse
> of existing orders. Here the F3 fills the field with the next
> ( new ) order number30 characters long. I also tested for the
> F4, F8 and F9 when entering field 1 to perform other tasks. I
> have to use the pushkey "[ENTR]" to leave the field and fire
> @wlf1 processing. Pressing F3,F4,F8,F9 does not leave the
> field like ENTER, TAB, SHIFT TAB, UP ARROW, DOWN ARROW etc..
> If field 1 was 1 character long, then just testing for "N" would work.
> This was the only way I could get @wuk to work since it came out.
>
> Bob Simcoe
>
> -----Original Message-----
> From:
> filepro-list-bounces+bob=midcityoffice.com at lists.celestial.com
>
> [mailto:filepro-list-bounces+bob=midcityoffice.com at lists.celes
tial.com] On Behalf Of John Esak
> Sent: Wednesday, October 27, 2010 7:31 PM
> To: filepro-list at lists.celestial.com
> Subject: RE: The @when user key function/feature....
>
> That's a neat construction.
>
> But you need to explain why the user can't just type an "N"
> in field 1 and rely on the @wlf1 as it is to work? Why have
> them press INSL to put a N into field 1 for them? Or, put
> another way, why not just go do whatever it is that
> subroutine gnono does and then SKIP to the next field on the
> screen if they press INSL. Most will be curious, including me. :-)
>
>
> John
>
>
> > -----Original Message-----
> > From: Bob Simcoe [mailto:bob at midcityoffice.com]
> > Sent: Wednesday, October 27, 2010 2:23 PM
> > To: john at valar.com; filepro-list at lists.celestial.com
> > Subject: RE: The @when user key function/feature....
> >
> > John
> > I use it all the time:
> > F3 example
> > All my applications are from a Stand file, and I'm always in
> > Add Records Mode.
> >
> > 44 ------- - - - - - - - - -
> > @wuk1 ◄ If: @sk eq "insl"
> > Then: lx(1,*,g) = "N" ; pushkey "[entr]"
> > .
> > .
> > .
> >
> > 71 ------- - - - - -
> > @wlf1 ◄ If: lx eq "N"
> > Then: gosub gnono ; end
> >
> >
> > Bob Simcoe
> >
> >
> >
> > -----Original Message-----
> > From:
> > filepro-list-bounces+bob=midcityoffice.com at lists.celestial.com
> >
> > [mailto:filepro-list-bounces+bob=midcityoffice.com at lists.celes
> > tial.com] On Behalf Of John Esak
> > Sent: Wednesday, October 27, 2010 2:15 PM
> > To: filepro-list at lists.celestial.com
> > Subject: The @when user key function/feature....
> >
> >
> > @wukNNN - F3, F4, F8, F9
> >
> > So how many people use this great function?
> >
> > I think it is often overlooked, and I know I use it a lot in
> > all my stuff.
> >
> > My feeling is it allows a whole extra level of processing,
> > i.e., a whole
> > different place to "be' when you're inside a filePro program.
> > It has some
> > trickyness to it when you first use it, but it is so
> worthwhile. Does
> > anyone have any questions about it or any good suggestions
> > regarding it?
> >
> >
> > 4.1 @WUKnnn When user keys F3 , F4 , F8 or F9
> > is pressed
> > in field "nnn". When the key is pressed,
> > the special
> > key label can be tested by using system
> > maintained
> > field @sk. The following key labels apply.
> >
> > F3 INSL
> > F4 DELL
> > F8 DPRT
> > F9 GRAF
> >
> >
> >
> > This is the HELP for the feature... I don't think many would
> > use the feature
> > if this is all they ever saw about it. Any comments?
> >
> >
> > John
> >
> >
> > P.s. - we have had a nice long spread of messages this past
> > month or so
> > about filePro-related stuff... And then today, finally, there
> > was nothing
> > but 9 messages I had to delete without-reading because none
> > of which were
> > about filePro, but rather about some pretty unrelated open
> > source thing or
> > whatever. Yes, usually, topics start out loosley related to
> > FP, but soon,
> > we end up seeing the same old names and the same old topics
> that have
> > nothing whatever to do with what we want to be talking about
> > here. I'm one
> > who sees no problem with OT: subjects, but that little
> > mechanism is fast
> > forgotten and we end up with the filePro people going away
> > for long periods
> > of time and the forum not being used for what we all want it
> > used for... And
> > eventually it not being used at all for long periods. So, when this
> > happens, I'm going to take it upon myself to throw out some
> > stuff that might
> > spark filePro talk.
> >
> >
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > Subscribe/Unsubscribe/Subscription Changes
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> > .
> > .
> > .
> > .
> > .
> > .
> > *** Message Virus Free. Email scanned by I-FILTER. ***
> > Corporate Anti-Spam and Anti-Virus email service by www.I-EVOLVE.com
> >
> > .
> > .
> > .
> > .
> > .
> > .
> > .
> > .
> > *** Message Virus Free. Email scanned by I-FILTER ***
> > Corporate Anti-Spam and Anti-Virus email service by www.I-EVOLVE.com
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> .
> .
> .
> .
> .
> .
> *** Message Virus Free. Email scanned by I-FILTER. ***
> Corporate Anti-Spam and Anti-Virus email service by www.I-EVOLVE.com
>
> .
> .
> .
> .
> .
> .
> .
> .
> *** Message Virus Free. Email scanned by I-FILTER ***
> Corporate Anti-Spam and Anti-Virus email service by www.I-EVOLVE.com
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
.
.
.
.
.
.
*** Message Virus Free. Email scanned by I-FILTER. ***
Corporate Anti-Spam and Anti-Virus email service by www.I-EVOLVE.com
.
.
.
.
.
.
.
.
*** Message Virus Free. Email scanned by I-FILTER ***
Corporate Anti-Spam and Anti-Virus email service by www.I-EVOLVE.com
More information about the Filepro-list
mailing list