Jump to content

Excel 2007 + Barcode Scanner + autoit help


nodswal
 Share

Recommended Posts

I scan equipment at work, each device has at least 2 barcodes to scan, currently I break up the amount of device into sets of about 10, scan the 1st barcode(asset tag), then go back and scan the 2nd bar code(serial), the reason why I do this is as soon as I scan the barcode, it jumps down and is ready for the next asset tag, and I can verify on small runs that the asset and the serial match up to that device so i don't get to far down the list and find one off.

I want to be able to scan the Asset then the serial as I go, and not touch the laptop to correct the cursor location to have it fill out the right information.

I have thought of ways in Excel, but non have executed as planned ( using a hotkey or onkey trap, and making it check the column, if in column C activate offset cell to D, and if in Col D Down a row, and Back to Col C) Tested it with {Return}, {Enter}, ~. PgUp, for some reason I don't know if I had done something wrong, but nothing was activating the hotkey in excel. I believe the barcode scaner types in the Serial as individual letter and sends the {Enter} key. I thought i might be able to make a tab order for it going c, D, then next Row down to C again, but couldn't find that either.

Autoit, a hotkey to intercept the {Enter} and a counter to make it move right instead of down, or down and left. The only draw back to this is, if I hit the wrong Barcode, it scans the Asset twice then the counter is off, and will need a either a hotkey to reset the counter, this is probably how I will end up doing it in the next few days, I'll post if I come up with anything, probably make an ini so I can change when it goes down for possible additional Barcodes to scan.

Made up Asset and Serial's, but pretty much how it looks.

____C___|____D____|____E____

__Asset__|__Serial__|

_D23423_|_JG07TK6_|

_D23452_|_9G08TK6_|

_D22343_|__________|

________|__________|

Any answers would help, I would like to see an Excel and Autoit Answer. Of course Error prevention, and extra options are always awesome. Thx Guys.

Link to comment
Share on other sites

I scan equipment at work, each device has at least 2 barcodes to scan, currently I break up the amount of device into sets of about 10, scan the 1st barcode(asset tag), then go back and scan the 2nd bar code(serial), the reason why I do this is as soon as I scan the barcode, it jumps down and is ready for the next asset tag, and I can verify on small runs that the asset and the serial match up to that device so i don't get to far down the list and find one off.

I want to be able to scan the Asset then the serial as I go, and not touch the laptop to correct the cursor location to have it fill out the right information.

I have thought of ways in Excel, but non have executed as planned ( using a hotkey or onkey trap, and making it check the column, if in column C activate offset cell to D, and if in Col D Down a row, and Back to Col C) Tested it with {Return}, {Enter}, ~. PgUp, for some reason I don't know if I had done something wrong, but nothing was activating the hotkey in excel. I believe the barcode scaner types in the Serial as individual letter and sends the {Enter} key. I thought i might be able to make a tab order for it going c, D, then next Row down to C again, but couldn't find that either.

Autoit, a hotkey to intercept the {Enter} and a counter to make it move right instead of down, or down and left. The only draw back to this is, if I hit the wrong Barcode, it scans the Asset twice then the counter is off, and will need a either a hotkey to reset the counter, this is probably how I will end up doing it in the next few days, I'll post if I come up with anything, probably make an ini so I can change when it goes down for possible additional Barcodes to scan.

Made up Asset and Serial's, but pretty much how it looks.

____C___|____D____|____E____

__Asset__|__Serial__|

_D23423_|_JG07TK6_|

_D23452_|_9G08TK6_|

_D22343_|__________|

________|__________|

Any answers would help, I would like to see an Excel and Autoit Answer. Of course Error prevention, and extra options are always awesome. Thx Guys.

Couldn't you just monitor the current active cell ($oExcel.ActiveSheet.ActiveCell.Column and .Row) in a loop and detect when its contents change? Hot keys and all are not required because the bar code scanner dumps the whole string in at once. If you use an appropriate delay between detection and reaction (say, 100ms) it shouldn't be a problem.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...