Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

Hey - this worked pretty well

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

ConsoleWrite($state & @LF)

I love answering my own questions :-)

Cygnus

Cygnus

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