#RequireAdmin #include #include #include #include #include Local $arr[5] = ["0xCD5C5C","0x800000","0xC21807","0xA45A52","0xB80F0A"] Local $arr2[5] = ["0x000080","0x0080FF","0x008081","0x95C8D8","0x3FE0D0"] Local $arr3[5] = ["0x00FF00","0x90EE90","0x00FF7F","0x228B22","0x8080000"] GUICreate("Color Box", 233, 131, Default, $WS_EX_TOPMOST) Global $box = GUICtrlCreateLabel("", 20, 20, 38, 30) GUICtrlSetBkColor(-1,0xFFFFFF) Local $dropdown = GUICtrlCreateCombo("", 66, 29, 70, 20) Local $dropdown2 = GUICtrlCreateCombo("", 143, 29, 70, 20) GUICtrlSetData($dropdown, "Red|Blue|Green" ) GUICtrlSetData($dropdown2, "" ) Local $comboread = "" Local $comboread2 = "" GUISetState(@SW_SHOW) HotKeySet ("{numpad9}", "MyExit") Global $load = GUICtrlCreateButton("LOAD",19,60,40) Global $save = GUICtrlCreateButton("SAVE", 19,87, 40) Global $show = GUICtrlCreateButton("SHOW COLOUR", 66, 70, 148, 34) While 1 $msg = GUIGetMsg() Select Case $msg = $load Call("Profile") Case $msg = $save Call("Save") Case $msg = $dropdown $comboread = GUICtrlRead($dropdown) If $comboread = "Red" Then GUICtrlSetData($dropdown2, "|Indian Red|Maroon|Chili|Redwood|Crimson" ) If $comboread = "Blue" Then GUICtrlSetData($dropdown2, "|Navy|Azure|Teal|Sky|Turquoise" ) If $comboread = "Green" Then GUICtrlSetData($dropdown2, "|Lime|Lightgreen|Spring|Forest|Olive" ) Case $msg = $dropdown2 $comboread2 = GUICtrlRead($dropdown2) $combosel2 = _GUICtrlComboBox_GetCurSel($dropdown2) Case $msg = $show If $comboread = "Red" Then GUICtrlSetBkColor($box,$arr[$combosel2]) If $comboread = "Blue" Then GUICtrlSetBkColor($box,$arr2[$combosel2]) If $comboread = "Green" Then GUICtrlSetBkColor($box,$arr3[$combosel2]) EndSelect WEnd Func Profile() _GUICtrlComboBox_SelectString($dropdown, IniRead("Colour Box.ini","Profile 1","$dropdown","")) _GUICtrlComboBox_SelectString($dropdown2, IniRead("Colour Box.ini","Profile 1","$dropdown2","")) GUICtrlSetBkColor($box,IniRead("Colour Box.ini","Profile 1","$boxcolour","")) EndFunc Func Save() IniWrite("Colour Box.ini","Profile 1","$dropdown",GUICtrlRead($dropdown)) IniWrite("Colour Box.ini","Profile 1","$dropdown2",GUICtrlRead($dropdown2)) If $comboread = "Red" Then IniWrite("Colour Box.ini","Profile 1","$boxcolour",$arr[$combosel2]) If $comboread = "Blue" Then IniWrite("Colour Box.ini","Profile 1","$boxcolour",$arr2[$combosel2]) If $comboread = "Green" Then IniWrite("Colour Box.ini","Profile 1","$boxcolour",$arr3[$combosel2]) EndFunc Func MyExit() Exit EndFunc