#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.1 Author: SurPriseS Script Function: midi conf. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ;------------------------------------------------------------------------------------------------------------ Include #include #include #include #include #include #include ;~ #Include ;------------------------------------------------------------------------------------------------------------ Variable Global $tweet Global $woofer Global $medium Global $l = 1 Global $ControleActive = 1 Dim $Control[32] ;--------------------------------------------------------------------------------- Variable INI ;----Fenetre générale Global $ini_titre1 = IniRead("conf.ini", "global", "window", "") Global $ini_bouton1 = IniRead("conf.ini", "global", "bouton_tweet", "") Global $ini_bouton2 = IniRead("conf.ini", "global", "bouton_medium", "") Global $ini_bouton3 = IniRead("conf.ini", "global", "bouton_woofer", "") Global $ini_bouton4 = IniRead("conf.ini", "global", "bouton_sub", "") Global $ini_bouton5 = IniRead("conf.ini", "global", "bouton_equa", "") $ini_HPF = IniRead("conf.ini", "1", "HPF", "") ;---- Onglet tweet Global $ini_titre3 = IniRead("conf.ini", "1", "cadre", "") Global $label1 = IniRead("conf.ini", "1", "droit", "") Global $label2 = IniRead("conf.ini", "1", "gauche", "") ;---- Onglet medium Global $ini_titre4 = IniRead("conf.ini", "2", "cadre", "") Global $label3 = IniRead("conf.ini", "2", "droit", "") Global $label4 = IniRead("conf.ini", "2", "gauche", "") ;---- Onglet woofer Global $ini_titre5 = IniRead("conf.ini", "3", "cadre", "") Global $label5 = IniRead("conf.ini", "3", "droit", "") Global $label6 = IniRead("conf.ini", "3", "gauche", "") ;---- Onglet sub Global $ini_titre6 = IniRead("conf.ini", "4", "cadre", "") Global $label7 = IniRead("conf.ini", "4", "droit", "") Global $label8 = IniRead("conf.ini", "4", "gauche", "") ;---- Onglet equa Global $ini_titre7 = IniRead("conf.ini", "5", "cadre", "") Global $label9 = IniRead("conf.ini", "5", "droit", "") Global $label10 = IniRead("conf.ini", "5", "gauche", "") ;------------------------------------------------------------------------------------------------------------ GUI $hGui1 = GUICreate($ini_titre1, 780, 580) ; fenêtre principale GUISetFont(20) $bouton_tweet = GUICtrlCreateButton($ini_bouton1, 10, 10, 185, 40) ; Bouton tweet $bouton_medium = GUICtrlCreateButton($ini_bouton2, 10, 60, 185, 40) ; Bouton medium $bouton_woofer = GUICtrlCreateButton($ini_bouton3, 10, 110, 185, 40) ; Bouton woofer $bouton_sub = GUICtrlCreateButton($ini_bouton4, 10, 160, 185, 40) ; Bouton sub $bouton_equa = GUICtrlCreateButton($ini_bouton5, 10, 210, 185, 40) ; Bouton equa ; -------------------------------------------------------------------------------------- Groupe principal $group1 = GUICtrlCreateGroup($ini_titre3, 205, 10, 570, 560) ;------------------------------------ droit $group2 = GUICtrlCreateGroup("Tweeter droit", 205, 40, 570, 530) GUICtrlSetFont(-1, 12) $Control[0] = GUICtrlCreateLabel("Pente Haute", 215, 80) GUICtrlSetFont(-1, 12) $Control[1] = GUICtrlCreateButton(" + ", 350, 70, 40, 40) $Control[2] = GUICtrlCreateButton(" - ", 550, 70, 40, 40) $Control[3] = GUICtrlCreateLabel("Coupure Haute", 215, 130) GUICtrlSetFont(-1, 12) $Control[4] = GUICtrlCreateButton(" + ", 350, 120, 40, 40) $Control[5] = GUICtrlCreateButton(" - ", 550, 120, 40, 40) $Control[6] = GUICtrlCreateLabel("Pente Basse", 215, 180) GUICtrlSetFont(-1, 12) $Control[7] = GUICtrlCreateButton(" + ", 350, 170, 40, 40) $Control[8] = GUICtrlCreateButton(" - ", 550, 170, 40, 40) $Control[9] = GUICtrlCreateLabel("Coupure basse", 215, 230) GUICtrlSetFont(-1, 12) $Control[10] = GUICtrlCreateButton(" + ", 350, 220, 40, 40) $Control[11] = GUICtrlCreateButton(" - ", 550, 220, 40, 40) $Control[12] = GUICtrlCreateGroup("Deca tempo", 600, 60, 170, 210) GUICtrlSetFont(-1, 14) $Control[13] = GUICtrlCreateButton(" + ", 620, 120, 135, 40) $Control[14] = GUICtrlCreateButton(" - ", 620, 220, 135, 40) ;------------------------------------ gauche $group3 = GUICtrlCreateGroup("Tweeter gauche", 205, 275, 570, 295) GUICtrlSetFont(-1, 12) $Control[15] = GUICtrlCreateLabel("Pente Haute", 215, 315) GUICtrlSetFont(-1, 12) $Control[16] = GUICtrlCreateButton(" + ", 350, 305, 40, 40) $Control[17] = GUICtrlCreateButton(" - ", 550, 305, 40, 40) $Control[18] = GUICtrlCreateLabel("Coupure Haute", 215, 365) GUICtrlSetFont(-1, 12) $Control[19] = GUICtrlCreateButton(" + ", 350, 355, 40, 40) $Control[20] = GUICtrlCreateButton(" - ", 550, 355, 40, 40) $Control[21] = GUICtrlCreateLabel("Pente Basse", 215, 415) GUICtrlSetFont(-1, 12) $Control[22] = GUICtrlCreateButton(" + ", 350, 405, 40, 40) $Control[23] = GUICtrlCreateButton(" - ", 550, 405, 40, 40) $Control[24] = GUICtrlCreateLabel("Coupure basse", 215, 465) GUICtrlSetFont(-1, 12) $Control[25] = GUICtrlCreateButton(" + ", 350, 455, 40, 40) $Control[26] = GUICtrlCreateButton(" - ", 550, 455, 40, 40) $Control[27] = GUICtrlCreateGroup("Deca tempo", 600, 295, 170, 210) GUICtrlSetFont(-1, 14) $Control[28] = GUICtrlCreateButton(" + ", 620, 355, 135, 40) $Control[29] = GUICtrlCreateButton(" - ", 620, 455, 135, 40) $Control[30] = GUICtrlCreateButton(" Droit > Gauche ", 220, 520, 200, 40) $Control[31] = GUICtrlCreateButton(" Gauche > Droit ", 560, 520, 200, 40) _ActiveControls($ini_HPF) Global $tweet = StringSplit($group1 & '.' & _ $group2 & '.' & _ $group3 & '.' & _ $Control[0] & '.' & _ $Control[1] & '.' & _ $Control[2] & '.' & _ $Control[3] & '.' & _ $Control[4] & '.' & _ $Control[5] & '.' & _ $Control[6] & '.' & _ $Control[7] & '.' & _ $Control[8] & '.' & _ $Control[9] & '.' & _ $Control[10] & '.' & _ $Control[11] & '.' & _ $Control[12] & '.' & _ $Control[13] & '.' & _ $Control[14] & '.' & _ $Control[15] & '.' & _ $Control[16] & '.' & _ $Control[17] & '.' & _ $Control[18] & '.' & _ $Control[19] & '.' & _ $Control[20] & '.' & _ $Control[21] & '.' & _ $Control[22] & '.' & _ $Control[23] & '.' & _ $Control[24] & '.' & _ $Control[25] & '.' & _ $Control[26] & '.' & _ $Control[27] & '.' & _ $Control[28] & '.' & _ $Control[29] & '.' & _ $Control[30] & '.' & _ $Control[31], '.') ; -------------------------------------------------------------------------------------- End GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $bouton_tweet $CurrentSetting = 1 $ini_HPF = IniRead("conf.ini", "1", "HPF", "") _ActiveControls($ini_HPF) GUICtrlSetData($group1, $ini_titre3) GUICtrlSetData($group2, $label1) GUICtrlSetData($group3, $label2) Case $msg = $bouton_medium $CurrentSetting = 2 $ini_HPF = IniRead("conf.ini", "2", "HPF", "") _ActiveControls($ini_HPF) GUICtrlSetData($group1, $ini_titre4) GUICtrlSetData($group2, $label3) GUICtrlSetData($group3, $label4) Case $msg = $bouton_woofer $CurrentSetting = 3 $ini_HPF = IniRead("conf.ini", "3", "HPF", "") _ActiveControls($ini_HPF) GUICtrlSetData($group1, $ini_titre5) GUICtrlSetData($group2, $label5) GUICtrlSetData($group3, $label6) Case $msg = $bouton_sub $CurrentSetting = 4 $ini_HPF = IniRead("conf.ini", "4", "HPF", "") _ActiveControls($ini_HPF) GUICtrlSetData($group1, $ini_titre6) GUICtrlSetData($group2, $label7) GUICtrlSetData($group3, $label8) Case $msg = $bouton_equa $CurrentSetting = 5 $ini_HPF = IniRead("conf.ini", "5", "HPF", "") _ActiveControls($ini_HPF) GUICtrlSetData($group1, $ini_titre7) GUICtrlSetData($group2, $label9) GUICtrlSetData($group3, $label10) Case Else For $i = 0 To 5 ;Nb_Total_Des_Controls (cf étape 3 ci dessus) If $msg = $Control[$i] Then _TraitementControls($CurrentSetting, $i) EndIf Next EndSelect WEnd ;------------------------------------------------------------------------------------------------------------- Fonction Func _ActiveControls($param) If $param = 0 Then GUICtrlSetState($Control[1], $GUI_disable) GUICtrlSetState($Control[2], $GUI_disable) GUICtrlSetState($Control[4], $GUI_disable) Else GUICtrlSetState($Control[1], $GUI_ENABLE) GUICtrlSetState($Control[2], $GUI_ENABLE) GUICtrlSetState($Control[4], $GUI_ENABLE) EndIf EndFunc ;==>_ActiveControls ; -------------------------------------------------------------------------------------- ;~ Func _GuiCtrlGroupSetState(ByRef $a_GroupArray, $i_State) ;~ For $l = 1 To $a_GroupArray[0] ;~ GUICtrlSetState($a_GroupArray[$i], $i_State) ;~ Next ;~ EndFunc ;==>_GuiCtrlGroupSetState ; -------------------------------------------------------------------------------------- Func _TraitementControls($Setting, $ControleActive) Switch $Setting Case 1 _tweeter($ControleActive) Case 2 _medium($ControleActive) Case 3 _woofer($ControleActive) Case 4 _sub($ControleActive) Case 5 _equa($ControleActive) EndSwitch EndFunc ;==>_TraitementControls ; -------------------------------------------------------------------------------------- Func _tweeter($ControleActive) Switch ($ControleActive) Case 1 ; ici le code pour clic + pente haute du tweeter droit Case 2 ; ici le code pour clic - pente haute du tweeter droit Case 3 ; ici le code pour clic + coupure haute du tweeter droit Case 4 ; ici le code pour clic - coupure haute du tweeter droit EndSwitch EndFunc ;==>_tweeter ; -------------------------------------------------------------------------------------- Func _medium($ControleActive) Switch ($ControleActive) Case 1 ; ici le code pour clic + pente haute du tweeter droit Case 2 ; ici le code pour clic - pente haute du tweeter droit Case 3 ; ici le code pour clic + coupure haute du tweeter droit Case 4 ; ici le code pour clic - coupure haute du tweeter droit EndSwitch EndFunc ;==>_medium ; -------------------------------------------------------------------------------------- Func _woofer($ControleActive) Switch ($ControleActive) Case 1 ; ici le code pour clic + pente haute du tweeter droit Case 2 ; ici le code pour clic - pente haute du tweeter droit Case 3 ; ici le code pour clic + coupure haute du tweeter droit Case 4 ; ici le code pour clic - coupure haute du tweeter droit EndSwitch EndFunc ;==>_woofer ; -------------------------------------------------------------------------------------- Func _sub($ControleActive) Switch ($ControleActive) Case 1 ; ici le code pour clic + pente haute du tweeter droit Case 2 ; ici le code pour clic - pente haute du tweeter droit Case 3 ; ici le code pour clic + coupure haute du tweeter droit Case 4 ; ici le code pour clic - coupure haute du tweeter droit EndSwitch EndFunc ;==>_sub ; -------------------------------------------------------------------------------------- Func _equa($ControleActive) Switch ($ControleActive) Case 1 ; ici le code pour clic + pente haute du tweeter droit Case 2 ; ici le code pour clic - pente haute du tweeter droit Case 3 ; ici le code pour clic + coupure haute du tweeter droit Case 4 ; ici le code pour clic - coupure haute du tweeter droit EndSwitch EndFunc ;==>_equa ; --------------------------------------------------------------------------------------