Jump to content
Sign in to follow this  
Yodavish

How to detect the "enter" sent from a bar code scanner - (Moved)

Recommended Posts

I'm completely new to AutoIt. I have a script that was given to me and I'm trying to update it. The issue I'm trying to resolve is when a barcode is accidentally scanned while a pdf viewer is active it will send an alert, in my case, just do a msgbox but eventually play a sound.  I can't get the detection of the enter produced by the scanner but it does work when I hit the enter key. Any help on this would be greatly appreciated. Here is the main portion of the code below:
 

Local $hDLL = DllOpen("user32.dll")

While 1 

    If WinActive("PDFViewer") AND _IsPressed("0D", $hDLL) Then
        MsgBox(0, "Test", "Enter was pressed with SumatraPDF open")
    EndIf

WEnd

 

Share this post


Link to post
Share on other sites

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team


"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!

Share this post


Link to post
Share on other sites

@Zedna I'm still new to AutoIt. What command is used to detect a randomly scanned barcode that a GUI isn't prompted for? In AutoHotKey it can detect the "Enter::" produced from the scanned barcode but it doesn't work the same in AutoIt.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...