Yodavish 0 Posted June 3, 2019 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
JLogan3o13 1,640 Posted June 3, 2019 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 280 Posted June 4, 2019 Maybe my example from my Barcode UDF can help you. I use WM_COMMAND + EN_CHANGE Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
Yodavish 0 Posted June 4, 2019 @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