1

I want to make a QR Codes to automate a process for label printing using Easy Labels.

I've already created QR codes that contain file paths and part numbers.

Where I'm running into a brick wall is finding a way to include Control Commands, specifically Ctrl+o and Ctrl+p so Open File and Print commands are issued from the QR code.

I've searched for weeks trying to find a way and this community is the closest thing I've found to a glimmer of hope.

Since I'm trying to do this in plain text, I have no code, so I will provide the desired sequence when scanned by the operator.

(Ctrl+o)T:\Easy Labels\Customers\Toyota\MEX_mat.lab
(Ctrl+p)1704412

The goal is to make a fast and easy way for operators to print their labels as quickly as possible with as few steps as possible on their part with minimum errors.

When the QR is scanned, the first thing it will need to do is issue an Open File command followed by a string that contains the entire file path where the labels for that particular part is located in the database, then sends a return carriage to finish the open process.

Next, it will send a single space to clear a pop-up window message.

Finally, it will send a Print command followed by another string that contains the part number.

If I have to wrote code to accomplish this, assistance would be greatly appreciated.

Karl
  • 854
  • 9
  • 21
editor1979
  • 45
  • 1
  • 3
  • Have you been able to generate a QR code that triggers the desired actions and are now looking for help how to achieve the same with EasyLabel? Or is the question more about how solve the problem from QR code to action? QR codes contain text. However, applications handle text completely separate from entering shortcuts (such as control commands). They will only accept shortcuts if they are coming from the keyboard or from a device pretending to be a keyboard. Please provide more information about how the QR code is scanned and what software and hardware is involved. – Codo Jul 11 '19 at 14:33
  • I have two different scanners I've been using. both are configured and recognized as generic USB Keyboards. One is an older Metrologic (since purchased by Honeywell) and the other is a cheap generic 2.4Ghz scanner purchased from Amazon. My main idea is to do QR Code to action since I have limited access to the Easy Label back end software in a business environment. My thought is, a keyboard has a Ctrl key on it. These scanners are emulating a USB keyboard. There must be a way to make the scanner "Push" the Ctrl key. The less incursion in the Easy Label software, the better. – editor1979 Jul 11 '19 at 16:42
  • I apologize. I realized I forgot to answer your first question. Have I been able to generate a QR code that triggers the desired actions? No. I have not. I've been searching for weeks trying to find a way to encode specifically the Ctrl+O and Ctrl+P commands or keyboard shortcuts. This website is the closest thing I've been able to find anywhere. [link]https://stackoverflow.com/questions/45222061/how-do-i-emulate-key-function-ctrl-b-to-a-barcode – editor1979 Jul 13 '19 at 02:36
  • This [QR code](https://jsfiddle.net/rb0o56wz/) contains the text of your question incl. the control characters. With it, you can test if your QR code scanners can do something reasonable with it. If that works, you can take take care of the second problem, namely how to create such a QR code with Easy Label. – Codo Jul 13 '19 at 08:44
  • I thank you for your assistance with this project. I used the attached QR Code you provided on the target computer. Although it did have a function embedded, it wasn't Ctrl+o. It actually had the effect of pressing the F2 key. Was this the intention? – editor1979 Jul 17 '19 at 14:46
  • The QR code contains the Unicode codepoints U+000F (for CTRL+O) and U+0010 (for CTRL+P). This corresponds to what these key combinations produces in the early Windows day. If it doesn't work, you'll need to talk to the manufacturer of the QR code scanner. But it might not be possible at all. – Codo Jul 17 '19 at 19:31
  • My previous test was conducted with a cheap, wireless barcode scanner I got off Amazon. Today, I was able to conduct the same test using a Metrologic MS1690 scanner, and wouldn't you know it? SUCCESS! Now, I have questions. Mainly, How did you do it? What software? What protocol? I've been at this for months with no success so an explanation would be greatly appreciated. Once I know how to do it, I have to teach an untrained labrodoodle (intern) how to do this 200 more times. Thank you again for your help! – editor1979 Jul 25 '19 at 03:53

1 Answers1

2

The test QR code has been generated with Java code. It might or might not be helpful for you:

package qrcodetest;

import io.nayuki.qrcodegen.QrCode;

public class QrCodeWithCtrl {

    public static void main(String[] args) {

        QrCode qrCode = QrCode.encodeText("\u000fT:\\Easy Labels\\Customers\\Toyota\\MEX_mat.lab\n\u00101704412", QrCode.Ecc.MEDIUM);
        System.out.println(qrCode.toSvgString(8));
    }
}

In the code \u000f stand for CTRL+O, \u0010 stands for CTRL+P. The four digit number is in hexadecimal and goes from 0001 for CTRL+A to 001a for CTRL+Z.

The code uses the QR code library (available on Maven Central):

io.nayuki:qrcodegen:1.4.0
Codo
  • 75,595
  • 17
  • 168
  • 206
  • After doing some tinkering around, figuring out what programs to use to actually generate the QR code, we found the scanner, at it's default of 2.5ms per character (40,000 characters per second) was WAY too fast for EasyLabels to reliably accept. Using the configuration manual for the scanner, we slowed the scanner down to 40ms per character (250 characters per second) and it became extremely stable and reliable. Codo, thank you for all your help in this project. I've been searching and asking a lot of people about this for months and you are the first person to not tell me it was impossible. – editor1979 Aug 01 '19 at 12:27