Re: Capturing barcodes without a 'text' field

2019-10-16 Thread Guy Algot via 4D_Tech
Peter, you could also put a hidden button on your form. The scanner could be 
programmed to trigger the button which would then grab the data being scanned 
and allow your code to process it.

> On Oct 15, 2019, at 4:22 PM, Peter Jakobsson via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi
> 
> Was wondering what technique people used for capturing scans into 4D. At the 
> moment I’m using a simple text field and the scanner simply ‘pastes’ the code 
> into the text field, but something a bit more sophisticated is called for 
> ideally where a scan can be “detected” by the 4D form even though no text 
> field may be present. (e.g. as one of a number of possible form actions or as 
> an alternative to a manual lookup of the product).
> 
> Is anybody implementing such an approach ? What capture methods do you use ? 
> (The scanner is connected to the USB port, not the RS232 serial port).
> 
> Best Regards
> 
> Peter


Later,
Guy

--
Guy Algot, Solutions Specialist
Edmonton, Alberta
(780) 974-8538

hardware, installation, training, support, programming, internet
specializing in 4th Dimension
=-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
they use Borg to do their marketing and Ferengi to do their programming."
-- Simon Slavin



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Capturing barcodes without a 'text' field

2019-10-16 Thread Peter Jakobsson via 4D_Tech
Hi Dougie

This is in fact what we do at the moment. (In fact it’s so simple I just use 
the 4D “Request” function to capture the barcode).

The only thing that would make a marked improvement while not complicating 
things too much would be for the capture to auto-enter itself after the scan 
(i.e. execute a TAB or CR). That would save them reaching for the keyboard 
every time between scans. I think the best way to do this seems to be to have 
the scanner send enclosing control characters to invoke the TAB as some have 
suggested. 

Peter

> On 16 Oct 2019, at 10:13, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> My advice is try not to complicate it.  If there is a lot of things going on 
> in your screen make the user make a conscious choice to go into or come out 
> of scanning mode.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Capturing barcodes without a 'text' field

2019-10-16 Thread Douglas Cryer via 4D_Tech
Peter,

As Pat said a barcode scanner is nothing more than an input device so it 
operates like a keyboard.  So an enterable text area is the easiest way to 
manage the input.

We do an awful  lot of barcode processing in our EPOS app as well as in our 
main ordering system.   It is about managing the focus of your text area 
whether it be visible of not, when you are in scanning mode.  My advice is try 
not to complicate it.  If there is a lot of things going on in your screen make 
the user make a conscious choice to go into or come out of scanning mode.

Regards, Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com 


 




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Capturing barcodes without a 'text' field

2019-10-16 Thread Peter Jakobsson via 4D_Tech
Thanks Jeff. Very useful information.

I also checked out your even more detailed responses on last year’s thread 
about this which were very informative.

Regards

Peter

> On 16 Oct 2019, at 00:54, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If you want to use a USB barcode scanner and still have complete control, you 
> can use ON EVENT CALL to manage this. You'll need to program a prefix 
> character and a suffix character into the barcode scanner,

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Capturing barcodes without a 'text' field

2019-10-15 Thread Tim Nevels via 4D_Tech
On Oct 15, 2019, at 6:25 PM, Peter Jakobsson wrote:

> Was wondering what technique people used for capturing scans into 4D. At the 
> moment I’m using a simple text field and the scanner simply ‘pastes’ the code 
> into the text field, but something a bit more sophisticated is called for 
> ideally where a scan can be “detected” by the 4D form even though no text 
> field may be present. (e.g. as one of a number of possible form actions or as 
> an alternative to a manual lookup of the product).
> 
> Is anybody implementing such an approach ? What capture methods do you use ? 
> (The scanner is connected to the USB port, not the RS232 serial port).

Check out the GET TEXT INPUT plugin that Miyako created. 

https://github.com/miyako/4d-plugin-get-text-input

You can use this to grab USB scanner input without the need to have the cursor 
in a text field on a form. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Capturing barcodes without a 'text' field

2019-10-15 Thread Jeffrey Kain via 4D_Tech
If you want to use a USB barcode scanner and still have complete control, you 
can use ON EVENT CALL to manage this. You'll need to program a prefix character 
and a suffix character into the barcode scanner, and have your ON EVENT CALL 
method watch for these characters to determine what to do.

For example, if you scan the text 123, and your barcode prefix character is 
 and the suffix character is , the stream passed to 4D will look like 
this:

123

So - for those forms where you want to process a barcode, you install an ON 
EVENT CALL method that's waiting for an  keypress event. When it sees one, 
it starts collecting the subsequent characters into a text variable (and 
filtering them from the event stream that would otherwise pass those characters 
to the form) until it sees an .

When it sees an , it stops collecting characters and then passes the 
buffer of what it collected back to the form (CALL FORM or CALL PROCESS if 
you're on an older version of 4D).

It's a fair amount of code and it takes awhile to shake out all the bugs, but 
it gives you complete control over the barcode scanner.

Jeff

On Oct 15, 2019, at 7:25 PM, Peter Jakobsson via 4d_tech@lists.4d.com> wrote:

> Was wondering what technique people used for capturing scans into 4D. At
> the moment I’m using a simple text field and the scanner simply ‘pastes’
> the code into the text field, but something a bit more sophisticated is
> called for ideally where a scan can be “detected” by the 4D form even
> though no text field may be present. (e.g. as one of a number of possible
> form actions or as an alternative to a manual lookup of the product).

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Capturing barcodes without a 'text' field

2019-10-15 Thread Pat Bensky via 4D_Tech
On Tue, 15 Oct 2019 at 23:22, Peter Jakobsson via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi
>
> Was wondering what technique people used for capturing scans into 4D. At
> the moment I’m using a simple text field and the scanner simply ‘pastes’
> the code into the text field, but something a bit more sophisticated is
> called for ideally where a scan can be “detected” by the 4D form even
> though no text field may be present. (e.g. as one of a number of possible
> form actions or as an alternative to a manual lookup of the product).
>
> Is anybody implementing such an approach ? What capture methods do you use
> ? (The scanner is connected to the USB port, not the RS232 serial port).
>
> Best Regards
>
> Peter
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **


A barcode scanner is simply another input device, like a keyboard, so
you’ll need to have a field or enterable variable selected in order to scan
something. If you start typing on your keyboard when no enterable object is
selected, it won’t capture your input.
HTH
Pat

> --
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Capturing barcodes without a 'text' field

2019-10-15 Thread Peter Jakobsson via 4D_Tech
Hi

Was wondering what technique people used for capturing scans into 4D. At the 
moment I’m using a simple text field and the scanner simply ‘pastes’ the code 
into the text field, but something a bit more sophisticated is called for 
ideally where a scan can be “detected” by the 4D form even though no text field 
may be present. (e.g. as one of a number of possible form actions or as an 
alternative to a manual lookup of the product).

Is anybody implementing such an approach ? What capture methods do you use ? 
(The scanner is connected to the USB port, not the RS232 serial port).

Best Regards

Peter

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**