Jump to content

Recommended Posts

Posted

Sorry for all the posts, if theirs a rule that doesnt allowed many post then tell me ^^

i need help!

how can i make a script, that if one check box is checked it will automatically check another check boxes?

again sry for all the posts, thank you!

Posted

Sorry for all the posts, if theirs a rule that doesnt allowed many post then tell me ^^

i need help!

how can i make a script, that if one check box is checked it will automatically check another check boxes?

again sry for all the posts, thank you!

I don't know if you duplicated posts (Not allowed). But you wrote any of code already?

Proof-of-concept:

Case $myCheckBox1
    If BitAnd(GUICtrlRead($myCheckBox1), $GUI_CHECKED) Then
          GUICtrlSetState($myCheckBox2, $GUI_CHECKED)
          GUICtrlSetState($myCheckBox3, $GUI_CHECKED)
          GUICtrlSetState($myCheckBox4, $GUI_CHECKED)
    EndIf
Posted

Sorry for all the posts, if theirs a rule that doesnt allowed many post then tell me ^^

i need help!

how can i make a script, that if one check box is checked it will automatically check another check boxes?

again sry for all the posts, thank you!

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 105, 48, 492, 184)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 0, 6, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox1Click")
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 0, 24, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox2Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func Checkbox1Click()   
    If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetState($Checkbox2, $GUI_UNCHECKED)
EndFunc

Func Checkbox2Click()
If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
EndFunc

Func Form1Close()
    Exit
EndFunc

--- TTFN

  • Moderators
Posted

@Terririfed,

Try this:

#include <GUIConstantsEx.au3>

$Check_State = 1

GUICreate("Test", 200, 200)

; Create repeat button group
GUICtrlCreateGroup ( "", 10, 15, 175, 65)
Opt("GUICoordMode",0); Relative coords
$Check1 = GUICtrlCreateCheckbox(" Slave 1",  10, 20, 130, 20)
$Check2 = GUICtrlCreateCheckbox(" Slave 2",  -1, 20, 130, 20)
Opt("GUICoordMode",1); GUI coords

; Create checkboxes
$Check3 = GUICtrlCreateCheckbox (" Master ",      10,  10)
    GUICtrlSetState(-1, $GUI_CHECKED)

GUISetState()

While 1

    $aMsg = GUIGetMsg()
        
    If $aMsg = -3 Then Exit
        
; Interaction Repeat checkbox and radio buttons
    If BitAnd(GUICtrlRead($Check3),$GUI_CHECKED) <> $Check_State Then
        $Check_State = Not $Check_State
        If $Check_State Then
            GUICtrlSetState($Check1, $GUI_ENABLE)
            GUICtrlSetState($Check1, $GUI_CHECKED)
            GUICtrlSetState($Check2, $GUI_ENABLE)
            GUICtrlSetState($Check2, $GUI_CHECKED)
        Else
            GUICtrlSetState($Check1, $GUI_DISABLE)
            GUICtrlSetState($Check1, $GUI_UNCHECKED)
            GUICtrlSetState($Check2, $GUI_DISABLE)
            GUICtrlSetState($Check2, $GUI_UNCHECKED)
        EndIf
    EndIf
    
WEnd

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

I need help in some thing else (please)

how can i make a hot key - that when a particular pixel on the screen (219,976) will be in a particular color (0x060606)

it will automatically "send q".

this action will repeat it self over and over until ill close it with another hotkey.

thank you very much!!

Posted

well your not looking for a hot key. You want a loop that continually checks that pixel with an if statement for that color.

yes, but i want a way to control it.

i don't want it to run all the time.

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