Jump to content

Detect checkbox state in date control


mark2004
 Share

Recommended Posts

I am using a date control with the ex-style $DTS_SHOWNONE (this puts a checkbox into the date control). I cannot

figure out how to determine what the state of this checkbox is. GuiCtrlRead and GuiCtrlgetState dont seem to work.

Any ideas?

Link to comment
Share on other sites

I am using a date control with the ex-style $DTS_SHOWNONE (this puts a checkbox into the date control). I cannot

figure out how to determine what the state of this checkbox is. GuiCtrlRead and GuiCtrlgetState dont seem to work.

Any ideas?

I think this works

$tStruct = dllstructcreate("ushort[8]")
$Checked  = GUICtrlSendMsg($dateBox,$DTM_GETSYSTEMTIME,0,dllstructgetptr($tstruct)) = 0
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

I am using a date control with the ex-style $DTS_SHOWNONE (this puts a checkbox into the date control). I cannot

figure out how to determine what the state of this checkbox is. GuiCtrlRead and GuiCtrlgetState dont seem to work.

Any ideas?

Use ControlCommand(...,"IsChecked") to check the state.

Link to comment
Share on other sites

Use ControlCommand(...,"IsChecked") to check the state.

Can you tell us what the control id is for the check box in a date control?

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

I think this works

$tStruct = dllstructcreate("ushort[8]")
$Checked  = GUICtrlSendMsg($dateBox,$DTM_GETSYSTEMTIME,0,dllstructgetptr($tstruct)) = 0

Thanks. I haven't used these techniques involving dll structures before. Is there a good tutorial you

could recommend on working with dll structures and send message etc. Otherwise, I'll just go on

google and see what I can find.

Link to comment
Share on other sites

Thanks. I haven't used these techniques involving dll structures before. Is there a good tutorial you

could recommend on working with dll structures and send message etc. Otherwise, I'll just go on

google and see what I can find.

The help file is a good place to start. DllCall needs to be understood and DllStructCreate and related. I find it helpful to read posts with problems and trying to understand the answers, or trying to work out an answer myself.
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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...