Hi All,
I have a rather unique set of requirements. We use a vendor-provided web app for a materials handling process. As user scans many parts, the web app quickly accepts the part# and displays status - "Successful" or an error message (which turns red).
Problem: Users keep scanning and miss error messages occasionally, so can be many parts in until they realize there was an error, causing rework.
Proposed Solution: I would like to parse the DOM to detect if the status message is Red each time the user scans a part# with the usb barcode scanner (HID device). I have managed to parse the DOM & detect the error condition, but am having a really hard time detecting when the barcode scanner is used. I tried hooking keyboard input & checking when 'Enter' is detected, but I seem to lose the hook when my Windows app loses focus (does that make sense?). I then tried finding the HID device and registering for DeviceNotifications. I was able to find and register the device (seemingly), but not getting any notifications when I scan. Does win7 have exclusive access? Any advice on how to detect a scan from a barcode scanner in a Windows app that doesn't have focus would be much appreciated. Cheers -
I have a rather unique set of requirements. We use a vendor-provided web app for a materials handling process. As user scans many parts, the web app quickly accepts the part# and displays status - "Successful" or an error message (which turns red).
Problem: Users keep scanning and miss error messages occasionally, so can be many parts in until they realize there was an error, causing rework.
Proposed Solution: I would like to parse the DOM to detect if the status message is Red each time the user scans a part# with the usb barcode scanner (HID device). I have managed to parse the DOM & detect the error condition, but am having a really hard time detecting when the barcode scanner is used. I tried hooking keyboard input & checking when 'Enter' is detected, but I seem to lose the hook when my Windows app loses focus (does that make sense?). I then tried finding the HID device and registering for DeviceNotifications. I was able to find and register the device (seemingly), but not getting any notifications when I scan. Does win7 have exclusive access? Any advice on how to detect a scan from a barcode scanner in a Windows app that doesn't have focus would be much appreciated. Cheers -