Source language: Translate to:

USB Scanner

General questions about NeoBook

Moderator: Neosoft Support

USB Scanner

Postby StarterPack » Sun Apr 09, 2017 8:10 am

Hi guys....

Is there a way I can use a usb scanner to scan code into a variable or must I use a plugin?
Thank You
StarterPack
 
Posts: 115
Joined: Fri Feb 19, 2016 6:55 am

Re: USB Scanner

Postby dpayer » Mon Apr 10, 2017 8:28 am

I use a USB scanner in my inventory app.

Typical output of the scanner is a string, followed by a carriage return [#13]. You can use the section of the Text Entry Properties under the Text Change tab and use some code like this:

Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
StrLen "[Stringentry]" "[Stringlen]"
While "[StringLen]" ">" "0"
StrLen "[Stringentry]" "[Stringlen]"
SearchStr "[#13][#10]" "[Stringentry]" "[FoundString13]" ""
      If "[FoundString13]" ">" "0"
         GoSub "ProcessString"

         Endwhile
      Endif
Endwhile
Parsed in 0.006 seconds, using GeSHi 1.0.8.10


to search for a carriage return, and when found have the field processed by a SubRoutine or other code.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: USB Scanner

Postby StarterPack » Mon Apr 10, 2017 12:13 pm

WOW! WOW! WOW! Thank You dpayer

I think I underestimate the POWER of Neobook

Works Great!!!! Thank You
StarterPack
 
Posts: 115
Joined: Fri Feb 19, 2016 6:55 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests