Previous Thread
Next Thread
Print Thread
Limited keyboard entry #33503 14 Oct 20 07:55 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Morning....

A customer has asked me can we please limited "keyboard entry" at their goods despatch where they use a USB/Keyboard bar code scanner and stop users overriding the system and entering a barcode (infld) in manually..
The users also cheats as they found ATE "auto mouse" and if the double click the item else where on the screen telling them to scan it, that it also populates the input field.

As you can guess the trouble is the USB scanner uses the keyboard input interface, i did try the INFLD timer and set it to 1 seconds, so they would have type faster than a scanner smile but the Timer switch only works on in-activity.. is there another switch similar that clears and resets INFLD with in a second. (The barcode scanner should still be faster enough to allow the input).

Also, Is there way turn "Auto Mouse" off? I click Auto Mouse and the tick never vanishes and stays on.

Re: Limited keyboard entry [Re: Steve - Caliq] #33504 14 Oct 20 02:04 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Interesting problem!

It has been awhile since I've looked very closely at the AutoMouse settings, but I did manage to locate this utility program: AMOUSE.BP which illustrates using AG_MOUSE commands. And the following does appear to work to disable the option:

Code
.RUN AMOUSE/1
AutoMouse set to  1 [disabled]


As for some way to inflict a severe case of attention deficit syndrome on INFLD such that it will only accept a burst of data, I'm going to need at least another cup of coffee...! We may need yet another type code that set the timer to unlimited initially (while waiting for the bar code) but then reset it to 1 second on receipt of the first character?

Re: Limited keyboard entry [Re: Steve - Caliq] #33505 14 Oct 20 02:57 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Thanks for part (1) disable AutoMouse smile for part two I told the customer just hide all the keyboard's... smile Enjoy your coffee..

Re: Limited keyboard entry [Re: Steve - Caliq] #33506 14 Oct 20 02:59 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
But I guess the customer be happier if we did have another type_code ..

Re: Limited keyboard entry [Re: Steve - Caliq] #33507 14 Oct 20 03:13 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Ok, I'm thinking it should be ||t, which is just like |t except the timeout doesn't start until the first character is received. Hopefully 1 second is short enough so that if they are manually typing, you'll get a result that is too short and you can reject it.

Note that under that model, it would be up to the app to reject the runt-sized entry. I guess the ultimate would be if INFLD automatically cleared the field on timeout if you hadn't yet typed the XMIN characters, but that seems too specialized to be of any use outside this particular situation.

Re: Limited keyboard entry [Re: Steve - Caliq] #33508 14 Oct 20 03:15 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Sounds good, I was just thinking after the second clear the field ... we may start to see a new world championship of keyboard ninjas trying to beat it!

Re: Limited keyboard entry [Re: Steve - Caliq] #33509 14 Oct 20 03:17 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Is there a disable paste? (thinking of other possible workarounds!)

Re: Limited keyboard entry [Re: Steve - Caliq] #33510 14 Oct 20 03:23 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
If they type anywhere as fast as you, I don't think we stand a chance!

So let me ponder that, and the paste disable. But is this a GUI field or text? (The paste operation works totally different between them.)

Re: Limited keyboard entry [Re: Steve - Caliq] #33511 14 Oct 20 03:25 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Ok.... INFLD/GUI

Re: Limited keyboard entry [Re: Steve - Caliq] #33512 14 Oct 20 05:37 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Hey Steve i am sure you might have already thought of this but if "disable" INFLD, will it still accept data from the reader?

Or what about hiding it off the screen? In coordinates that are not visible by the current open dialog? (i did this by accident so i know it's possibel wink

Re: Limited keyboard entry [Re: Steve - Caliq] #33513 14 Oct 20 05:46 PM
H
Herman Roehm
Unregistered
Herman Roehm
Unregistered
H
Frank, that’s actually how I do it on the recommendation of Jorge 😊

Re: Limited keyboard entry [Re: Steve - Caliq] #33514 14 Oct 20 05:48 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
what a sneaky way.. smile what happens if they just type the barcode numbers in and press C/R (even if nothing shows on screen) i guess even hidden it allows it?

Re: Limited keyboard entry [Re: Steve - Caliq] #33515 14 Oct 20 05:51 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
I could try this "hide" first ..to save Jack making any changes... until some clever spark comes along and works it out.
Or jack fixes the out of screen bug smile and the INFLD reappears smile

Re: Limited keyboard entry [Re: Steve - Caliq] #33518 14 Oct 20 06:48 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
LOL be careful what you ask for!!

Perhaps your clever users might still figure it out but at least if you hide the cookie jar they might not think to open wink

Re: Limited keyboard entry [Re: Steve - Caliq] #33519 14 Oct 20 06:50 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
As long as they don’t smell the cookies it may just work..

Re: Limited keyboard entry [Re: Steve - Caliq] #33520 14 Oct 20 07:04 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
laugh

Re: Limited keyboard entry [Re: Steve - Caliq] #33522 14 Oct 20 07:33 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
This actually gives me a new idea for a great new design: the totally invisible UI. Think of how many problems that would eliminate in one fell swoop!

Re: Limited keyboard entry [Re: Steve - Caliq] #33523 14 Oct 20 11:47 PM
H
Herman Roehm
Unregistered
Herman Roehm
Unregistered
H
But that would get rid of millicolumns!

Re: Limited keyboard entry [Re: Steve - Caliq] #33524 15 Oct 20 12:23 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
They'd be upgraded to vaporcolumns. (With infinite precision being just one of their virtues.)

While you salivate over that possibility, here's a beta update with the delayed timer start and disabled paste features...

ash65notes.txt
ash-6.5.1691.0-w32-upd.zip
ash-6.5.1691.0-w32c-upd.zip

Note that I had to use a different type code, ||1 because ||t was already taken for a variation of date/time.

Also note that it currently is just a piggy-back on the existing timer mechanism. Essentially it just issues the suspend timer command at the start, after which it acts like a normal timeout (i.e. reactivating the timer on the first character). But I'm a little worried that you're going to say that the 1 second timeout isn't enough of a challenge for your fleet-fingered friends. The problem is that the logic is currently based on timer routines with only one-second resolution, meaning that to be sure we didn't cheat the speedy scribe we really have to wait until the seconds value has increased by 2. If it's too easy to out-type the timer, we might have to look into changing it over to millisecond (or nanosecond?) precision.

Re: Limited keyboard entry [Re: Steve - Caliq] #33525 15 Oct 20 08:28 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
wow, fast.. thanks that must of been one good cuppa coffee you had yesterday.

good News...
* Paste disable works a treat, Type code: (||p
* Auto disabled Auto Mouse perfectly.

Not so much luck with the ||1 timer, not sure if i also had to set INFLD'TIMER to 1, i tried setting it and leaving it zero.

Code
  XCALL INFLD, INFLD'ROW, INFLD'COL, INFLD'XMAX, INFLD'XMIN, INFLD'TYPE,&
        INFLD'ENTRY, INFLD'INXCTL ,INFLD'V, INFLD'OPCODE, INFLD'EXITCODE,&
        INFLD'TIMER, INFLD'CMDFLG, INFLD'DEFPT, INFLD'MAXPT, INFLD'FUNMAP,&
        INFLD'SETDEF, INFLD'INFCLR, INFLD'HLPIDX, INFLD'MAXWID


Unless one of my other type codes are missing me up? - See attached.

Thanks!

Attached Files INFLD.PNG
Re: Limited keyboard entry [Re: Steve - Caliq] #33526 15 Oct 20 04:31 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Sorry, the notes may not have been sufficiently explicit regarding the necessity of setting the INFLD'TIMER parameter to something (i.e. 1 being the smallest possible timeout). I'm not sure whether the delayed timeout wasn't working at all for you, or was it just that the "1 second" seemed like an eternity?

Here's my test program...
Code
! test ||1 delayed timer feature

map1 EXITCODE,F
map1 ENTRY,S,20
map1 TIMER,B,2
map1 TYPE,S,50,"VW4[]|B|C|Q|ak3|R||fg||1||p|G*12T9|u"

   ? tab(-1,0);"Windows delayed timer test"
   input "Timer  : ",TIMER

   ? TAB(5,1);"INFLD:";
   xcall INFLD, 5, 10, 20, 0, TYPE, ENTRY, &
        0, 1, 1, EXITCODE, TIMER, 0, -1, -1, -1

   ? tab(6,1)
   ? "ENTRY: [";ENTRY;"]"
   ? "EXITCODE: ";EXITCODE
   ? "TIMER: ";TIMER

end


Code
.RUN INFLFD5
Windows delayed timer test
Timer  : 1

INFLD:   <GUI edit appears, suspend timer also starts counting down in bottom corner,
               wait 5 secs to confirm no timeout; then type '1234' and wait...>

<timeout occurs after 1-2 secs, resulting in this...>

ENTRY: [1234]
EXITCODE:  11
TIMER:  1


If the problem is that the 1-2 second timeout is way too long, then we may need to switch to a more precise timer, or maybe handle the combination of ||1 and TIMER=1 (or maybe 0?) as a special case with a 100 ms timeout? But if it's not working at all, then we have a different problem to solve first.

Re: Limited keyboard entry [Re: Steve - Caliq] #33527 15 Oct 20 04:39 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Just tried your example and does kind of what you say.. but I was expecting as I type 1 2 3 4 5 6 7 when a second was up from start of me typing it would clear the field so i had start again, currently if i dont stop it carry's on...
Or was that what you mean with:
Quote

1 second timeout isn't enough of a challenge for your fleet-fingered friends. The problem is that the logic is currently based on timer routines with only one-second resolution, meaning that to be sure we didn't cheat the speedy scribe we really have to wait until the seconds value has increased by 2. If it's too easy to out-type the timer, we might have to look into changing it over to millisecond (or nanosecond?) precision.

And you have have a whole second between key presses for it to clear/restart?

Re: Limited keyboard entry [Re: Steve - Caliq] #33528 15 Oct 20 05:02 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Ok, first I can see now that it is resetting the timer after each character, which is not what you want. That should be easy to fix.

But as for what happens when it times out, I was thinking that exiting with the exitcode=11 (timeout) was the most flexible option, leaving it to the application to decide whether the input was sufficient to be valid. But I guess we could say that if it failed to satisfy the XMIN characters, then it would make sense to just clear the field, reset/suspend the timer, and start over again from the beginning?

Re: Limited keyboard entry [Re: Steve - Caliq] #33529 15 Oct 20 05:04 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Ah ok smile

I’m happy with either exitcode=11 or just clear the field / start again.

Re: Limited keyboard entry [Re: Steve - Caliq] #33530 15 Oct 20 05:49 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Ok, here's a second pass at it ...

ash65notes.txt
ash-6.5.1691.1-w32-upd.zip

The problem with the first version was more subtle than it appeared. It wasn't resetting the timer after each character. But it so happens that the normal timer mechanism gets processed only once per second, and timeout is only checked for after one second of no activity. So as long as you were typing at least one character per second, you were avoiding the timeout test. The new version now checks for timeout after after character, as well as after every second without input. So now I think you might actually find it challenging to type in a, say, 10 character field before it times out (assuming TIMER=1). I had to use the AutoMouse or paste feature to properly verify that I could in fact enter several characters successfully.

I think having the application take care of weeding out invalid entries and resetting the field is the right call, since you probably need to have logic like that anyway in order to deal with defective scans.

One detail that might still be open to question is that of treating the initial wait for the first character as equivalent to the suspend feature (10 minutes) is that you absolutely have to be prepared to deal with timeout, at least every 10 minutes. But it seems like the you need to have that logic anyway, so I'm not sure I see any advantage in adding special logic to not time out after 10 minutes of inactivity.

Re: Limited keyboard entry [Re: Steve - Caliq] #33531 15 Oct 20 06:50 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Thanks for 1691.1.. and prefect! ...

I cant copy, I cant AutoMouse, I cant type fast! crazy

you can see here

Much appreciated! and im sure it will be so from our customer in Derby..

(I'll play more and implemented it the right place play rather than my test tomorrow)

Re: Limited keyboard entry [Re: Steve - Caliq] #33532 15 Oct 20 07:39 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
The movie was pretty gripping, but it could use a better sound track - maybe something Wagnerian. The ending was nice though. (Literally!)

Re: Limited keyboard entry [Re: Steve - Caliq] #33533 15 Oct 20 07:43 PM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
cool

Re: Limited keyboard entry [Re: Steve - Caliq] #33534 16 Oct 20 10:36 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Customer updated his ATE with latest ashw32.exe 1691.1 and you have great feed back! works a treat.. (no more wrong stock items shipped due to employees typing in a wrong barcode rather than SCAN the right one)

Is it possible to have a new ATE/Install build at a convenient point. Thanks.

Re: Limited keyboard entry [Re: Steve - Caliq] #33541 17 Oct 20 11:53 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
(New custom ATE installer uploaded)

Re: Limited keyboard entry [Re: Steve - Caliq] #33542 18 Oct 20 08:05 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Thankyou!


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3