Jump to content

Recommended Posts

Posted

$Checkbox1 = GUICtrlCreateCheckbox("3", 48, 56, 97, 17)

Controlsend("$a", "", "" ,"3")

how do i link them?

so if $Checkbox1 is tick

when i press a Run button it will send controlsend("$........ and stuff?

any help appreisiated

Posted

You put it in the part of the code relevant to clicking the Run button

#include <GUIConstantsEx.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 286, 117, 193, 125)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 24, 24, 225, 17)
$runButton = GUICtrlCreateButton("Run", 24, 56, 81, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $runButton
            If BitAnd(GuiCtrlRead($Checkbox1),$GUI_CHECKED) then 
            ;Controlsend("$a", "", "" ,"3")
                Msgbox(0,"Winner","The checkbox is ticked")
            ;Whatever else you want to do
            Endif
    EndSwitch
WEnd

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