nekkutta 0 Posted November 2, 2010 (edited) I'm pretty good at autoit, but when it comes to handling windows message codes, haven't really had much experience. I've read through the help file and example scripts and it really didn't help much... I am writing a program for someone to use in their business and I really need to get this working. I have one primary gui that spawns off other guis, each gui is in a function with the ctrls that need to be modified declared as globals, but there is several comboboxes spread across the various guis and I realize I will have to use GuiRegisterMsg for $WM_COMMAND, and I understand that there are 4 parameters for the $WM_COMMAND function, $hWnd, $iMsg, $iwParam, $ilParam. $hWnd and $iMsg I can get, but in the examples it does some weird things with the $iwParam, and the $ilParam ie. $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word $iCode = BitShift($iwParam, 16) ; Hi Word could someone clarify some of this, maybe some example code, to help me figure out how to setup a layered switch to switch between the various guis and then the comboboxes in those guis. TIA EDIT: This is what I have come up with after doing some more reading, and I am afraid to test it without getting some expert opinion on it. (also I don't have the database populated either, lol) Func _AutoCompleteHandle($hWnd, $iMsg, $iwParam, $ilParam) $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word $iCode = BitShift($iwParam, 16) ; Hi Word Switch $hWnd Case $frm_Main Switch $ilParam Case $cmb_Main_PlayerSelect If $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Main_PlayerSelect) Case $cmb_Main_Quests If $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Main_Quests) Case $cmb_Main_Achievement If $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Main_Achievement) EndSwitch Case $frm_Acheiv_Admin If $ilParam = $cmb_Achiev And $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Achiev) Case $frm_Quest_Admin If $ilParam = $cmb_Quests And $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Quests) EndSwitch Return $GUI_RUNDEFMSG EndFunc please let me know if I'm on the right track with this, or if I have something wrong. Edited November 3, 2010 by nekkutta [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Share this post Link to post Share on other sites
PsaltyDS 39 Posted November 3, 2010 I am writing a program for someone to use in their business and I really need to get this working... Case $cmb_Main_PlayerSelect If $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Main_PlayerSelect) Case $cmb_Main_Quests If $iCode = $CBN_EDITCHANGE Then _GUICtrlComboBox_AutoComplete($cmb_Main_Quests) Business... Riiiiiiiight. Have you seen this? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
nekkutta 0 Posted November 3, 2010 Yes, I have and this is for an instore rpg player(ie. customer) database. so unless you wish to help.... [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Share this post Link to post Share on other sites
PsaltyDS 39 Posted November 3, 2010 Yes, I have and this is for an instore rpg player(ie. customer) database. so unless you wish to help....Let the eye rolling continue unabated... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
Jos 2,214 Posted November 3, 2010 Read sticky at the top of support forum about no Bot support. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites