p90x Posted December 4, 2015 Share Posted December 4, 2015 I have and application that is running and is can recognize 2d barcodes. So even when the app is not the top focus application it will become the top app as soon as the scan happens. My problem is when the app is not top focus and someone scans a 1D barcode the app does not respond. Any ideas on maybe solving this>? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 4, 2015 Moderators Share Posted December 4, 2015 @p90x welcome to the forum. Are these applications written in AutoIt? If so, how about posting the code? Otherwise, you're asking us to first guess at what you're trying to do and then help you troubleshoot. Help us help you p90x 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Theultrahead Posted December 5, 2015 Share Posted December 5, 2015 I've had to deal with a similar issue where I work. I wrote a little script that listens for a HotKey that would be "typed" by the barcode scanner. The barcode scanner you have seems to be like mine in that it basically emulates keyboard entry, at least for 1D. The 1D scanner I have will only scan a barcode if it is 3 characters or longer, so I printed out a barcode that typed /// when scanned. My script, upon seeing /// being "typed", would activate the window I needed scan into.HotKeySet("/", "Command") While 1 Sleep(100) WEnd Func Command() WinActivate ("WindowToScanInto") ControlFocus ( "WindowToScanInto", "", CertainControlID ) ;Uncomment the above line if you need to activate a particular control. EndFunc p90x 1 Link to comment Share on other sites More sharing options...
p90x Posted December 10, 2015 Author Share Posted December 10, 2015 (edited) Theultrahead Thanks so much. Let me give this a try.This is the format of the barcode that I'm scanning:\`0100361553364651\`How do I mod your code, Sorry I just started using autoIT for the first time when I posted the original message. Edited December 10, 2015 by p90x Link to comment Share on other sites More sharing options...
p90x Posted December 10, 2015 Author Share Posted December 10, 2015 I've had to deal with a similar issue where I work. I wrote a little script that listens for a HotKey that would be "typed" by the barcode scanner. The barcode scanner you have seems to be like mine in that it basically emulates keyboard entry, at least for 1D. The 1D scanner I have will only scan a barcode if it is 3 characters or longer, so I printed out a barcode that typed /// when scanned. My script, upon seeing /// being "typed", would activate the window I needed scan into.HotKeySet("/", "Command") While 1 Sleep(100) WEnd Func Command() WinActivate ("WindowToScanInto") ControlFocus ( "WindowToScanInto", "", CertainControlID ) ;Uncomment the above line if you need to activate a particular control. EndFunc Theultrahead Thanks so much. Let me give this a try.This is the format of the barcode that I'm scanning:\`0100361553364651\`How do I mod your code, Sorry I just started using autoIT for the first time when I posted the original message. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now