Terrified Posted January 7, 2009 Posted January 7, 2009 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!
Josbe Posted January 7, 2009 Posted January 7, 2009 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 AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Zinthose Posted January 7, 2009 Posted January 7, 2009 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
FireFox Posted January 7, 2009 Posted January 7, 2009 @Terrified No problem #Include <GuiConstants_Ex.au3> GuiCreate("GUI",200,200) $ck_1 = GuiCtrlCreateCheckBox("ck_1",5,5) $ck_2 = GuiCtrlCreateCheckBox("ck_2",5,5) GuiSetState() While 1 If GuiCtrlRead($ck_1) = $GUI_CHECKED then GuiCtrlSetState($ck_2, $GUI_CHECKED) Else GuiCtrlSetState($ck_2, $GUI_UNCHECKED) EndIf WEnd Cheers, FireFox.
Moderators Melba23 Posted January 7, 2009 Moderators Posted January 7, 2009 @Terririfed, Try this: expandcollapse popup#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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Terrified Posted January 7, 2009 Author Posted January 7, 2009 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!!
youknowwho4eva Posted January 7, 2009 Posted January 7, 2009 well your not looking for a hot key. You want a loop that continually checks that pixel with an if statement for that color. Giggity
Terrified Posted January 7, 2009 Author Posted January 7, 2009 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.
Robjong Posted January 8, 2009 Posted January 8, 2009 Hey, try this.... HotKeySet("{1}", "_Toggle") Global $fDO = 1 While 1 ;~ If $fDO Then ConsoleWrite("Doing something...." & @CRLF) If $fDO And Hex(PixelGetColor(219, 976), 6) == 060606 Then Send("q") Sleep(100) WEnd Func _Toggle() $fDO = Not $fDO EndFunc
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now