Barcode Scanner

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
levisimcoe
Posts: 21
Joined: 03 Mar 2014, 19:37

Barcode Scanner

03 Feb 2018, 21:31

I'm quite familiar with AHK and have been using it for quite some time. I'm currently using a 2D barcode scanner to scan information into a GUI input field. When the barcode is finished scanning I use RegEg to separate out the information that I need.

The question I have is about the barcode scanner and not AHK (Unless AHK can help me out...). I'm looking to speed up how fast the barcode is sending the information to my computer. Currently, the barcode scanner is sending the information one key at a time. I'm using the barcode scanner to scan PDF 417 barcodes which contain a lot of information. I have tried using SetKeyDelay in order to speed up how fast the barcode scanner is "typing" the information.

I'm aware that each barcode scanner is different, but I'm wondering if someone can help me out with this. The current barcode scanner I have is a "DataMax" which appears to be a foreign barcode scanner so unfortunately contacting the supplier is off the table...

http://www.datamax.hk/en/?p=11&a=view&r=12

Although the website says its a 1D barcode scanner, the one I have looks identical to the one shown in the link above. It is wireless as well (Bluetooth).

My question for those people out there who are familiar with barcode scanners is:
- Is there a way to scan the information to a variable (clipboard) rather then typing out the information slowly? Essentially, I want all the information dumped at once (similar to command paste) where I can instantly get onto the next step.

Thoughts?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Barcode Scanner

04 Feb 2018, 09:20

If you own an iOS device the "Scandit" app might be your last resort. Highly recommended :thumbup:
Flybird
Posts: 2
Joined: 07 Sep 2020, 02:20

Re: Barcode Scanner

07 Sep 2020, 02:36

Hi Levisimcoe, I'm new to AHK so I'm not really sure if I'm following the right procedure to contact you. Some time ago you initiated a post about hoe to "Copy Multiple Items and Paste Multiple Items" and, since I'm having a similar problem, I'd like to know if you could share the script you created to solve this issue. I've tried to use the script you showed on the post but it doesn't work (the compiler shows an error on the seconde line "SendMode Input"), this being why I'm writing to you.
Thanks in advanced for your cooperation.
gregster
Posts: 8988
Joined: 30 Sep 2013, 06:48

Re: Barcode Scanner

07 Sep 2020, 04:04

Flybird wrote:
07 Sep 2020, 02:36
Hi Levisimcoe, I'm new to AHK so I'm not really sure if I'm following the right procedure to contact you. Some time ago you initiated a post about hoe to "Copy Multiple Items and Paste Multiple Items" and, since I'm having a similar problem, I'd like to know if you could share the script you created to solve this issue. I've tried to use the script you showed on the post but it doesn't work (the compiler shows an error on the seconde line "SendMode Input"), this being why I'm writing to you.
Thanks in advanced for your cooperation.
Not @levisimcoe here (the user wasn't online for some time), but you probably mean this script from here (2013): https://autohotkey.com/board/topic/98711-copy-multiple-items-and-paste-multiple-items/?p=620777 (our archived forums):

Code: Select all

#SingleInstance force
SendMode Input
handleClip("clear")

handleClip(action)
{
   static
  
   if (action = "save")
   {
      AddNextNum:= AddNextNum < 30 ? AddNextNum+1 : 1
      HighestNum+= HighestNum < 30 ? 1 : 0
      GetNextNum:= AddNextNum , ClipArray%AddNextNum% := Clipboard
   }
   else if ((action = "get") || (action = "roll")) && (GetNextNum != 0)
   {
      if (action = "roll")
         Send ^z
      Clipboard := ClipArray%GetNextNum%
      GetNextNum:= GetNextNum > 1 ? GetNextNum-1 : HighestNum  
      Send ^v
   }
   else if ((action = "rollforward") && (GetNextNum != 0))
   {
      Send, ^z
      GetNextNum:= GetNextNum < HighestNum ? GetNextNum+1 : 1
      Clipboard:= ClipArray%GetNextNum%
      Send, ^v
   }
   else if (action = "clear")
      GetNextNum:=0, AddNextNum=HighestNum=0
}

^c::
   suspend on
   Send ^c
   suspend off
   handleClip("save")
return

#0::handleClip("clear")
#v::handleClip("get")
#\::handleClip("roll")
#^\::handleClip("rollforward")
It sounds very strange that there would be an error for the line Sendmode Input. After all, Sendmode was already introduced in version 1.0.43 in 2006. What was the error? What AHK version are you using (I would try the current v1.1.33.02) ? Did you copy the script correctly?

If you don't get an answer from the script author, it's probably a good idea to post in our 'Ask For Help' forum with your general problem or question - of course, you can also refer to the script above (while I haven't tried it and it might not be totally up-to-date syntax-wise, it looks like it could still work). But please have a look first at my questions above - if the SendMode Input line is really a problem, there is probably something fundamental going wrong on your side.
Flybird
Posts: 2
Joined: 07 Sep 2020, 02:20

Re: Barcode Scanner

07 Sep 2020, 16:31

Hi, firstly I'd like to thank you for your quick reply.
I copied the scritp again to ensure there were no errors and, once again, when I tride to run it, this is the reply I received:

Error at line 181
Line Text: SendMode Input
Error: This line does not contain a recognized action.
The program will exit.

I'm using Autohotkey version 1.0.42.07

I hope this info gives you a hint as to where the problem might lie.
Thanks for your coop
gregster
Posts: 8988
Joined: 30 Sep 2013, 06:48

Re: Barcode Scanner

07 Sep 2020, 16:36

That was the hint:
gregster wrote:
07 Sep 2020, 04:04
After all, Sendmode was already introduced in version 1.0.43 in 2006. What was the error? What AHK version are you using (I would try the current v1.1.33.02) ?
Flybird wrote:
07 Sep 2020, 16:31
I'm using Autohotkey version 1.0.42.07
Why do you use such an ancient version? Your version 1.0.42.07 is from March 9, 2006 :shock: - and obviously predates v1.0.43 by a skosh.

I think you will get more problems with your version, for example, assume-static mode (which is used here) was introduced later in v1.0.48. There might be more problems - I don't know the details of all the versions of the last 17 years. The code above is from November 2013 - use at least a version from that year to be sure... or create a topic in 'Ask For help', if you still have problems then.

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 9 guests