Sign in to follow this  
Followers 0
martin

Guictrlgetstate

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



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:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

ControlGetFocus() ?


[center]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.[/center]

Share this post


Link to post
Share on other sites

#5 ·  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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0