#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) GUICtrlSetState(-1, $GUI_show) ;------------------------------------ droit $group2 = GUICtrlCreateGroup("Tweeter droit", 205, 40, 570, 530) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[0] = GUICtrlCreateLabel("Pente Haute",215,80) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[1] = GUICtrlCreateButton(" + " , 350, 70, 40, 40) if $ini_HPF = 0 then GUICtrlSetState(-1, $GUI_disable) if $ini_HPF = 1 then GUICtrlSetState(-1, $GUI_show) $Control[2]= GUICtrlCreateButton(" - ", 550, 70, 40, 40) if $ini_HPF = 0 then GUICtrlSetState(-1, $GUI_disable) if $ini_HPF = 1 then GUICtrlSetState(-1, $GUI_show) $Control[3] = GUICtrlCreateLabel("Coupure Haute",215,130) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[4] = GUICtrlCreateButton(" + " , 350, 120, 40, 40) if $ini_HPF = 0 then GUICtrlSetState(-1, $GUI_disable) if $ini_HPF = 1 then GUICtrlSetState(-1, $GUI_show) $Control[5] = GUICtrlCreateButton(" - ", 550, 120, 40, 40) if $ini_HPF = 0 then GUICtrlSetState(-1, $GUI_disable) if $ini_HPF = 1 then GUICtrlSetState(-1, $GUI_show) $Control[6] = GUICtrlCreateLabel("Pente Basse",215,180) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[7] = GUICtrlCreateButton(" + " , 350, 170, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[8] = GUICtrlCreateButton(" - ", 550, 170, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[9] = GUICtrlCreateLabel("Coupure basse",215,230) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[10] = GUICtrlCreateButton(" + " , 350, 220, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[11] = GUICtrlCreateButton(" - ", 550, 220, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[12]= GUICtrlCreateGroup("Deca tempo", 600, 60, 170, 210) GUICtrlSetFont(-1,14) GUICtrlSetState(-1, $GUI_show) $Control[13] = GUICtrlCreateButton(" + " , 620, 120, 135, 40) GUICtrlSetState(-1, $GUI_show) $Control[14] = GUICtrlCreateButton(" - ", 620, 220, 135, 40) GUICtrlSetState(-1, $GUI_show) ;------------------------------------ gauche $group3 = GUICtrlCreateGroup("Tweeter gauche", 205, 275, 570, 295) GUICtrlSetFont(-1, 12) GUICtrlSetState(-1, $GUI_show) $Control[15] = GUICtrlCreateLabel("Pente Haute",215,315) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[16] = GUICtrlCreateButton(" + " , 350, 305, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[17] = GUICtrlCreateButton(" - ", 550, 305, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[18] = GUICtrlCreateLabel("Coupure Haute",215,365) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[19] = GUICtrlCreateButton(" + " , 350, 355, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[20] = GUICtrlCreateButton(" - ", 550, 355, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[21] = GUICtrlCreateLabel("Pente Basse",215,415) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[22] = GUICtrlCreateButton(" + " , 350, 405, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[23] = GUICtrlCreateButton(" - ", 550, 405, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[24] = GUICtrlCreateLabel("Coupure basse",215,465) GUICtrlSetFont(-1,12) GUICtrlSetState(-1, $GUI_show) $Control[25] = GUICtrlCreateButton(" + " , 350, 455, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[26] = GUICtrlCreateButton(" - ", 550, 455, 40, 40) GUICtrlSetState(-1, $GUI_show) $Control[27] = GUICtrlCreateGroup("Deca tempo", 600, 295, 170, 210) GUICtrlSetFont(-1,14) GUICtrlSetState(-1, $GUI_show) $Control[28] = GUICtrlCreateButton(" + " , 620, 355, 135, 40) GUICtrlSetState(-1, $GUI_show) $Control[29] = GUICtrlCreateButton(" - ", 620, 455, 135, 40) GUICtrlSetState(-1, $GUI_show) $Control[30] = GUICtrlCreateButton(" Droit > Gauche " , 220, 520, 200, 40) GUICtrlSetState(-1, $GUI_show) $Control[31] = GUICtrlCreateButton(" Gauche > Droit ", 560, 520, 200, 40) GUICtrlSetState(-1, $GUI_show) GUICtrlSetState(-1, $GUI_show) 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","") GUICtrlSetData($group1,$ini_titre3) GUICtrlSetData($group2,$label1) GUICtrlSetData($group3,$label2) Case $msg = $bouton_medium $CurrentSetting=2 $ini_HPF = IniRead("conf.ini","2","HPF","") GUICtrlSetData($group1,$ini_titre4) GUICtrlSetData($group2,$label3) GUICtrlSetData($group3,$label4) Case $msg = $bouton_woofer $CurrentSetting=3 $ini_HPF = IniRead("conf.ini","3","HPF","") GUICtrlSetData($group1,$ini_titre5) GUICtrlSetData($group2,$label5) GUICtrlSetData($group3,$label6) Case $msg = $bouton_sub $CurrentSetting=4 $ini_HPF = IniRead("conf.ini","4","HPF","") GUICtrlSetData($group1,$ini_titre6) GUICtrlSetData($group2,$label7) GUICtrlSetData($group3,$label8) Case $msg = $bouton_equa $CurrentSetting=5 $ini_HPF = IniRead("conf.ini","5","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 _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 ; -------------------------------------------------------------------------------------- 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 ; -------------------------------------------------------------------------------------- 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 ; -------------------------------------------------------------------------------------- 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 ; -------------------------------------------------------------------------------------- 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 ; -------------------------------------------------------------------------------------- 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 ; --------------------------------------------------------------------------------------