Barcode Scanner to Trigger Macro

I apologize in advance for my ignorance. I'm COMPLETELY new to Macros on Mac (I used a similar function through 3rd party software on PC about 15 years ago, so I understand the gist, I just don't understand the current lingo for this platform, but I'm learning). I have searched through the forum for similar questions and I found SOME similarities, but not exactly what I'm looking for and I'm not skilled yet enough to make the connection for my own purposes.

I'm a small business owner and I'm trying to integrate SKU barcodes on product labels, that I can then scan into a QuickBooks Invoice. I've tried to create this with record function but I'm not sure how to edit the key functions to make this work.

Basically, I want to scan a barcode and have it: input today's date, tab, input the scanned value, down arrow, down arrow, enter, tab(8 times).

I'm JUST getting started with this project, so I am able to: A. choose any 1D or 2D barcode format that would work well, and B. Create SKUs with some type of trigger string (e.g. if my SKU is ABC123, I could create the barcode as ZZZZZABC123, where "ZZZZZ" could be the trigger).

Am I on the right track here? Can someone help me with this?

2 Likes

Welcome @joelpete. It seems that you have a clear idea about what you want your macro to do, and that you have broken down the job into logical steps. But after that, it appears you are hoping that Quick Recording will make up for your unfamiliarity with writing KM macros. Would that be correct?

By key functions, do you mean Actions? Or more widely, how to get things done in KM? I would suggest this is not just a case of learning "current lingo" but of sufficiently understanding KM's concepts and of needing to get some practice in writing simple macros before tackling the barcode project.

There are helpful people here who would be able to comment on your macro if you posted what you have so far, along with questions. First though you do need to understand what you are doing specifically with KM (your experience with other macro software is already helping you think things through). Make sure you know how to write simple macros (without Quick Recording).

I hope this helps. Of course, if I have misunderstood the situation, you'll let us know. :wink:

1 Like

Start by checking your scanner software -- most have the ability to prepend/append "control codes" to a scan, and some have codes for things like "today's date". It may be that you can do the whole thing from the scanner itself.

1 Like

Kevinb,

You're not wrong, this is certainly a more complex Macro than I should start with. And, "lingo" wasn't the right term. I should say, I don't understand the arguments used by KM. It looks far more like programming to me, than the software I used to use.

Here's the thing. I'm not looking to become an expert on Macros. My focus is on running a business, and hopefully learning some stuff along the way, and more importantly streamlining my processes. I realize mastering KM is something that would take many hours to do (if you're not coming from a programming background) and here I am asking for a magic shortcut...

I'm happy to do some fiddling around, run through some tutorials, and learn a thing or two, but like I said, my focus is elsewhere. If there is someone with expertise in KM that can help me develop what I need, or is willing to work with me to develop it, I am more than willing to remunerate for one's time. Even if it's just, "This is the argument for the scanned trigger string, 'XYZ123'."

1 Like

Nige_S,
So, the scanner is fairly limited in that. I can add prefix/suffix as you mentioned. It will also allow me add a timestamp prefix/suffix, but the field I'm trying to put it in is a date only, and the timestamp includes a time, which errors the field. I have managed to turn on the default carriage return, but it looks like that is the extent of the help I will get directly through the scanner.

1 Like

You have a sensible perspective on this. I appreciate that you may want this particular job done in a hurry. For the longer term, the time it takes to learn the basics of KM shouldn't be overestimated (especially since you have relevant experience).

1 Like

I'm watching some Youtube tutorials now. :+1:t2:

What are your available options for those, and what's the data stored in the barcode -- is it always numbers, letters, a mix, consistent in format or highly varied. (I suspect much of that depends on whether you want to scan someone else's barcode or they're always your own SKUs.)

There is no "I've scanned a barcode" trigger to set your macro running. But a barcode is presented to your computer as text, so you could use a "Typed String" trigger with a regular expression match. How fancy that needs to be will depend on what else the computer is used for, and you can reduce false positives by pre-/appending to the barcode in the scanner software. So if your barcodes are consistently of the format ABC123 you could set your barcode scanner to output BC=ABC123=BC (which you're unlikely to type yourself!) and your macro's "Typed String" trigger would be something like

...and you could extract the TriggerValue to use later in the macro.

The other way to do it would be to trigger your macro manually and throw up a "Prompt for User Input" dialog -- the barcode scan would go into the input field and setting the scanner software to append a Return character should (untested) "OK" the prompt for you, submitting the data to the macro.

Once you've got the barcode data in, the rest should be straight forward... Stop laughing at the back!

So which would be your preferred workflow -- scan to trigger or manual trigger?