Jump to content

Recommended Posts

Posted

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.
Posted

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. :lmao:

Posted

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. :lmao:

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.
  • Moderators
Posted

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.

Posted (edited)

ControlGetFocus() ?

Oh, That ControlGetFocus()!

Thanks SmOke N

Edited 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.

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
×
×
  • Create New...