martin Posted January 21, 2006 Share Posted January 21, 2006 I want to know when a combobox has focus, but the value returned by GuiCtrlGetState is always 0x50 whether it's focused or not. How should I do it? This is the jist of what I'm doing While 1 $msg = GUIGetMsg() If $msg = $findbutton Then startsearch() EndIf $gl = GuiCtrlGetState($combobox) If bitand($gl,$GUI_FOCUS) Then $combofocused = 1 Else $combofocused = 0 EndIf If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
jpm Posted January 21, 2006 Share Posted January 21, 2006 GuiCtrlstate just return the first 3 states + show hidden enable, disable. I have to correct the doc as the pointer back to GUICtrlSetState is confusing. THe other info set by GuiCtrlSetState are not real state. Link to comment Share on other sites More sharing options...
martin Posted January 21, 2006 Author Share Posted January 21, 2006 GuiCtrlstate just return the first 3 states + show hidden enable, disable.I have to correct the doc as the pointer back to GUICtrlSetState is confusing. THe other info set by GuiCtrlSetState are not real state. OK, but how do I tell if a control has focus? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 23, 2006 Moderators Share Posted January 23, 2006 ControlGetFocus() ? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
martin Posted January 23, 2006 Author Share Posted January 23, 2006 (edited) ControlGetFocus() ? Oh, That ControlGetFocus()!Thanks SmOke N Edited January 23, 2006 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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