Jump to content
Sign in to follow this  
thexshadow

If GUICtrlCreateInput empty

Recommended Posts

thexshadow

Is there a way to read if a GUICtrlCreateInput is empty?

I know you are going to have to use GUICtrlRead(), but what would I use for the advanced parameter?

If BitAND(GUICtrlRead($1),?something?) Then
      If BitAND(GUICtrlGetState($01), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($01, $GUI_ENABLE)
      Else
      If BitAND(GUICtrlGetState($01), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($01, $GUI_DISABLE)
      EndIf
Edited by thexshadow

Share this post


Link to post
Share on other sites
martin

Is there a way to read if a GUICtrlCreateInput is empty?

I know you are going to have to use GUICtrlRead(), but what would I use for the advanced parameter?

If BitAND(GUICtrlRead($1),?something?) Then
 If BitAND(GUICtrlGetState($01), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($01, $GUI_ENABLE)
 Else
 If BitAND(GUICtrlGetState($01), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($01, $GUI_DISABLE)
 EndIf

There is no advanced parameter oiption for inputs.

You read the contents of an input with GuiCtrlRead($InputID) which returns text so BitANding it wit something doesn't really make any sense. You just need

If GUICtrlRead($1)='' Then
 If Not BitAND(GUICtrlGetState($01), $GUI_ENABLE) Then GUICtrlSetState($01, $GUI_ENABLE)
 Else
 If Not BitAND(GUICtrlGetState($01), $GUI_DISABLE) Then GUICtrlSetState($01, $GUI_DISABLE)
 EndIf

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
thexshadow

Ah ha ha, whoops. Thanks martin.

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  

×