Jump to content

how to read a checkbox


Luigi
 Share

Recommended Posts

Hi! I try read a check box, for example any boton from "start menu and task bar", in first way I used PIXELGETCOLOR, to verify is marked.

If marked, the pixel is black, then nothing to do.

If not marked, send a control ALT B, to mark option.

Run("Rundll32.exe C:\WINDOWS\SYSTEM32\SHELL32.DLL,Options_RunDLL 1")

$var = PixelGetColor( x , y )

If $var = 0 Then

Send("!{b}")

EndIf

Exist another way to read this informartion?

Thanks! 8D

Visit my repository

Link to comment
Share on other sites

If GUICtrlRead($Checkbox) = $GUI_CHECKED Then

or

If BitAnd(GUICtrlRead($Checkbox), $GUI_UNCHECKED) Then

Replace $Checkbox with whatever variable you use for the checkbox. Both work for me, I'm sure there are other ways too.

Edited by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

He is talking about non autoit guis..

Check ControlCommand() in helpfile. You can use the "IsChecked" flag.

Realy... I am not talking about AutoIt GUIs.

Thanks Manjish! ControlCommand resolve my problem.

$p = "Propriedades da Barra de tarefas e do menu Iniciar"

Run("Rundll32.exe C:\WINDOWS\SYSTEM32\SHELL32.DLL,Options_RunDLL 1")

WinActivate("[CLASS:#32770]","")

WinWaitActive("[CLASS:#32770]","")

ControlCommand($p, "&Ocultar automaticamente a barra de tarefas", "Button2", "UnCheck", "")

ControlCommand($p, "&Manter a barra de tarefas sobre as outras janelas", "Button3", "Check", "")

Send("!{l}")

Visit my repository

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