Je souhaite rendre inutilisable, un combo, un checkbox si un autre checkbox est actif !
Voici mon code:
► Afficher le texte
Code : Tout sélectionner
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=googletrack.ico
#AutoIt3Wrapper_outfile=SkinToolDS.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <file.au3>
Dim $version = "1.0"
$hwmd_Reciver = GUICreate("IcarDS Skinner Tool "&$version&" by pierrotm777", 500, 560, -1, -1,$WS_OVERLAPPEDWINDOW)
$Commands = GUICtrlCreateButton("Commands", 5, 5, 100, 25)
$LiveDebugLog = GUICtrlCreateButton("Live Debug Log", 105, 5, 100, 25)
$Commands = GUICtrlCreateButton("RR Files", 230, 5, 80, 25)
$LiveDebugLog = GUICtrlCreateButton("Options", 325, 5, 80, 25)
$onTop = GUICtrlCreateCheckbox("On Top?", 420, 10, 120, 20)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Enter any command that icarDS understands, such as AUDIO to go to the music screen",20,40,490,20)
$CommandToSend1 = GUICtrlCreateCombo("", 10, 65, 360, 30)
GUICtrlSetData(-1, "Audio|Video|Dvd|", "")
$Command1 = GUICtrlCreateButton("Send Command", 380, 65, 100, 25)
$CommandToSend2 = GUICtrlCreateCombo("", 10, 95, 360, 30)
GUICtrlSetData(-1, "Audio|Video|Dvd|", "")
$Command2 = GUICtrlCreateButton("Send Command", 380, 95, 100, 25)
$CommandToSend3 = GUICtrlCreateCombo("", 10, 125, 360, 30)
GUICtrlSetData(-1, "Audio|Video|Dvd|", "")
$Command3 = GUICtrlCreateButton("Send Command", 380, 125, 100, 25)
$CommandToSend4 = GUICtrlCreateCombo("", 10, 155, 360, 30)
GUICtrlSetData(-1, "Audio|Video|Dvd|", "")
$Command4 = GUICtrlCreateButton("Send Command", 380, 155, 100, 25)
$RestartRR = GUICtrlCreateButton("-Restart-" & @CRLF & "RR", 10, 185, 60, 35, BitOR($BS_MULTILINE,$WS_GROUP))
$Group1 = GUICtrlCreateGroup("", 8, 225, 480, 82)
$Radio11 = GUICtrlCreateRadio("Variable", 25, 235, 80, 17)
$Radio12 = GUICtrlCreateRadio("Label", 105, 235, 80, 17)
$Radio13 = GUICtrlCreateRadio("Indicator", 185, 235, 80, 17)
$VariableToRead1 = GUICtrlCreateCombo("", 20, 255, 230, 30)
GUICtrlSetData(-1, "Audio|Video|Dvd|", "")
$GetContents1 = GUICtrlCreateButton("Get Contents", 270, 248, 100, 25)
$AutoUpdate1 = GUICtrlCreateCheckbox("Auto Update?", 390, 252, 90, 17)
$ResultatVariable1 = GUICtrlCreateInput("", 25, 282, 450, 20)
If _IsChecked($Radio11)= $GUI_CHECKED or _IsChecked($Radio12) or _IsChecked($Radio13) Then
GUICtrlSetState($VariableToRead1,$GUI_ENABLE)
GUICtrlSetState($AutoUpdate1,$GUI_ENABLE)
Else
GUICtrlSetState($VariableToRead1,$GUI_DISABLE)
GUICtrlSetState($AutoUpdate1,$GUI_DISABLE)
EndIf
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()
GUISetState(@SW_SHOW)
Func _IsChecked($control)
Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc ;==>_IsChecked


