Sign in to follow this  
Followers 0
CygnusX1

Checkbox State

6 posts in this topic

Hello All,

I'm trying to use the function: $state = GUICtrlGetState(1024) to get the state of a checkbox. The function keeps returning -1. I used the AutoIt Window Info and get the Control ID but still no luck. I was able to get the handle of the control using: ControlGetHandle but now what?

The Window Info says the control is a button.

I read a few posts on this problem but couldn't find a solution. The control was not created with GUICtrlCreate therefore GUICtrlRead doesn't work either.

Thanks for any help.

Cygnus


Cygnus

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

EDIT: I just read the end of your post...

Edited by Swift

Share this post


Link to post
Share on other sites

We could use another hint - is the checkbox in a webpage or in an application on the local machine, or remote machine?


Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

Swift... you need to re-read the OP

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks for the quick responses.

GUICtrlRead does not work. I thought this only worked for controls create with GUICtrlCreate.

The checkbox is on a local machine and is not a webpage.

Cygnus


Cygnus

Share this post


Link to post
Share on other sites

Hey - this worked pretty well

$state = ControlCommand($sOptions, "Use Monkey Wrench", 1024, "IsChecked")

ConsoleWrite($state & @LF)

I love answering my own questions :-)

Cygnus


Cygnus

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