FrancescoDiMuro Posted January 9, 2017 Share Posted January 9, 2017 (edited) Hi guys! How are you? Hope fine I'm working with a barcode reader and I'd like to have the same result on my input in a GUI as I have on an Excel sheet. Better example: If I scan the barcode, on the Excel sheet I have a totally different result on a GUI's input. Why? Thanks EDIT: My mistake... The barcode reads and print correctly data, but, the interconnection with EN_CHANGE command, print only 1 character... How can I still use that function, without printing only 1 character? Thanks Edited January 9, 2017 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
jchd Posted January 9, 2017 Share Posted January 9, 2017 Post a reproducer, the shorter/simpler the better. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted January 9, 2017 Author Share Posted January 9, 2017 I create the GUI with: Func GUIPrelevaProdotto() #Region ### START Koda GUI section ### Form=C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Gestione Magazzino\form_PrelevaProdotto.kxf $form_PrelevaProdotto = GUICreate("form_PrelevaProdotto", 334, 108, @DesktopWidth/2 - 96, @DesktopHeight/2 - 161) ; 192, 124 $input_CodiceProdotto = GUICtrlCreateInput("input_CodiceProdotto", 16, 48, 305, 21) $input_Messaggio = GUICtrlCreateInput("input_CodiceProdotto", 16, 72, 305, 21) $label_Titolo = GUICtrlCreateLabel("Preleva Prodotto", 68, 10, 196, 33) GUICtrlSetFont(-1, 18, 800, 0, "Arial") GUISetState(@SW_SHOW, $form_PrelevaProdotto) #EndRegion ### END Koda GUI section ### EndFunc I manage my WM_COMMAND with: Func My_WM_COMMAND($hwnd, $msg, $wparam, $lparam) If _WinAPI_LoWord($wparam) = $input_CodiceProdotto And _WinAPI_HiWord($wparam) = $EN_KILLFOCUS And GUICtrlRead($input_CodiceProdotto) <> "" Then ; Do the research PrelevaProdotto() GUICtrlSetState($input_CodiceProdotto, $GUI_FOCUS) EndIf Return $GUI_RUNDEFMSG EndFunc The func PrelevaProdotto manages the research of the barcode scanned... It doesn't affect the code that you need I'd like to scan the barcode, and, without touch anything, call the function PrelevaProdotto(), but, as I explained above, I didn't manage to do it with the event $EN_CHANGE, because seems to be too much faster ( it doesn't allow the text to be entered in the input from the barcode scanner ), it only receive 1 character, it's too much fast! Thanks for your reply Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
spudw2k Posted January 9, 2017 Share Posted January 9, 2017 Did you try $EN_UPDATE instead? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted January 9, 2017 Author Share Posted January 9, 2017 7 minutes ago, spudw2k said: Did you try $EN_UPDATE instead? Now I'm coming home I'll try asap, thanks buddy Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted January 10, 2017 Author Share Posted January 10, 2017 23 hours ago, spudw2k said: Did you try $EN_UPDATE instead? Seems to be faster! Uff! :/ Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
spudw2k Posted January 10, 2017 Share Posted January 10, 2017 Drag, I thought the update notification would fire when the update was completed, versus the change notification which fires when a change to text is made (which is probably why you got 1 letter at a time). What is going on in your PrelevaProdotto function? How does it read the inputbox? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted January 10, 2017 Author Share Posted January 10, 2017 2 minutes ago, spudw2k said: Drag, I thought the update notification would fire when the update was completed, versus the change notification which fires when a change to text is made (which is probably why you got 1 letter at a time). What is going on in your PrelevaProdotto function? How does it read the inputbox? I added this at the function WM_COMMAND, and works If _WinAPI_LoWord($wparam) = $input_CodiceProdotto And _WinAPI_HiWord($wparam) = $EN_UPDATE And Sleep(250) And GUICtrlRead($input_CodiceProdotto) <> "" Then Thanks for your help! Stay tuned, please! I need your knowledge! Really thanks! Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette 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