Jump to content
Sign in to follow this  
tobiczech

Color Selector

Recommended Posts

tobiczech

Hi, I am created small application as helper for choose color.

English isn’t my first language, so please excuse any mistakes.

fzbvwo.png

#cs ----------------------------------------------------------------------------


 AutoIt Version: 3.3.10.2
 Author:         Tobiczech
 Name:           Color selector


#ce ----------------------------------------------------------------------------


#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <Array.au3>


Global $colors[140]


$colors[0] = 0x000000 ; Black
$colors[1] = 0x000080 ; Navy
$colors[2] = 0x00008B ; DarkBlue
$colors[3] = 0x0000CD ; MediumBlue
$colors[4] = 0x0000FF ; Blue
$colors[5] = 0x006400 ; DarkGreen
$colors[6] = 0x008000 ; Green
$colors[7] = 0x008080 ; Teal
$colors[8] = 0x008B8B  ; DarkCyan
$colors[9] = 0x00BFFF ; DeepSkyBlue
$colors[10] = 0x00CED1 ; DarkTurquoise
$colors[11] = 0x00FA9A ; MediumSpringGreen
$colors[12] = 0x00FF00 ; Lime
$colors[13] = 0x00FF7F ; SpringGreen
$colors[14] = 0x00FFFF ; Aqua
$colors[15] = 0x00FFFF ; Cyan
$colors[16] = 0x191970 ; MidnightBlue
$colors[17] = 0x1E90FF ; DodgerBlue
$colors[18] = 0x20B2AA ; LightSeaGreen
$colors[19] = 0x228B22 ; ForestGreen
$colors[20] = 0x2E8B57 ; SeaGreen
$colors[21] = 0x2F4F4F ; DarkSlateGray
$colors[22] = 0x32CD32 ; LimeGreen
$colors[23] = 0x3CB371 ; MediumSeaGreen
$colors[24] = 0x40E0D0 ; Turquoise
$colors[25] = 0x4169E1 ; RoyalBlue
$colors[26] = 0x4682B4 ; SteelBlue
$colors[27] = 0x483D8B ; DarkSlateBlue
$colors[28] = 0x48D1CC ; MediumTurquoise
$colors[29] = 0x4B0082 ; Indigo
$colors[30] = 0x556B2F ; DarkOliveGreen
$colors[31] = 0x5F9EA0 ; CadetBlue
$colors[32] = 0x6495ED ; CornflowerBlue
$colors[33] = 0x66CDAA ; MediumAquaMarine
$colors[34] = 0x696969 ; DimGray
$colors[35] = 0x6A5ACD ; SlateBlue
$colors[36] = 0x6B8E23 ; OliveDrab
$colors[37] = 0x708090 ; SlateGray
$colors[38] = 0x778899 ; LightSlateGray
$colors[39] = 0x7B68EE ; MediumSlateBlue
$colors[40] = 0x7CFC00 ; LawnGreen
$colors[41] = 0x7FFF00 ; Chartreuse
$colors[42] = 0x7FFFD4 ; Aquamarine
$colors[43] = 0x800000 ; Maroon
$colors[44] = 0x800080 ; Purple
$colors[45] = 0x808000 ; Olive
$colors[46] = 0x808080 ; Gray
$colors[47] = 0x87CEEB ; SkyBlue
$colors[48] = 0x87CEFA ; LightSkyBlue
$colors[49] = 0x8A2BE2 ; BlueViolet
$colors[50] = 0x8B0000 ; DarkRed
$colors[51] = 0x8B008B ; DarkMagenta
$colors[52] = 0x8B4513 ; SaddleBrown
$colors[53] = 0x8FBC8F ; DarkSeaGreen
$colors[54] = 0x90EE90 ; LightGreen
$colors[55] = 0x9370D8 ; MediumPurple
$colors[56] = 0x9400D3 ; DarkViolet
$colors[57] = 0x98FB98 ; PaleGreen
$colors[58] = 0x9932CC ; DarkOrchid
$colors[59] = 0x9ACD32 ; YellowGreen
$colors[60] = 0xA0522D ; Sienna
$colors[61] = 0xA52A2A ; Brown
$colors[62] = 0xA9A9A9 ; DarkGray
$colors[63] = 0xADD8E6 ; LightBlue
$colors[64] = 0xADFF2F ; GreenYellow
$colors[65] = 0xAFEEEE ; PaleTurquoise
$colors[66] = 0xB0C4DE ; LightSteelBlue
$colors[67] = 0xB0E0E6 ; PowderBlue
$colors[68] = 0xB22222 ; FireBrick
$colors[69] = 0xB8860B ; DarkGoldenRod
$colors[70] = 0xBA55D3 ; MediumOrchid
$colors[71] = 0xBC8F8F ; RosyBrown
$colors[72] = 0xBDB76B ; DarkKhaki
$colors[73] = 0xC0C0C0 ; Silver
$colors[74] = 0xC71585 ; MediumVioletRed
$colors[75] = 0xCD5C5C ; IndianRed
$colors[76] = 0xCD853F ; Peru
$colors[77] = 0xD2691E ; Chocolate
$colors[78] = 0xD2B48C ; Tan
$colors[79] = 0xD3D3D3 ; LightGrey
$colors[80] = 0xD87093 ; PaleVioletRed
$colors[81] = 0xD8BFD8 ; Thistle
$colors[82] = 0xDA70D6 ; Orchid
$colors[83] = 0xDAA520 ; GoldenRod
$colors[84] = 0xDC143C ; Crimson
$colors[85] = 0xDCDCDC ; Gainsboro
$colors[86] = 0xDDA0DD ; Plum
$colors[87] = 0xDEB887 ; BurlyWood
$colors[88] = 0xE0FFFF ; LightCyan
$colors[89] = 0xE6E6FA ; Lavender
$colors[90] = 0xE9967A ; DarkSalmon
$colors[91] = 0xEE82EE ; Violet
$colors[92] = 0xEEE8AA ; PaleGoldenRod
$colors[93] = 0xF08080 ; LightCoral
$colors[94] = 0xF0E68C ; Khaki
$colors[95] = 0xF0F8FF ; AliceBlue
$colors[96] = 0xF0FFF0 ; HoneyDew
$colors[97] = 0xF0FFFF ; Azure
$colors[98] = 0xF4A460 ; SandyBrown
$colors[99] = 0xF5DEB3 ; Wheat
$colors[100] = 0xF5F5DC ; Beige
$colors[101] = 0xF5F5F5 ; WhiteSmoke
$colors[102] = 0xF5FFFA ; MintCream
$colors[103] = 0xF8F8FF ; GhostWhite
$colors[104] = 0xFA8072 ; Salmon
$colors[105] = 0xFAEBD7 ; AntiqueWhite
$colors[106] = 0xFAF0E6 ; Linen
$colors[107] = 0xFAFAD2 ; LightGoldenRodYellow
$colors[108] = 0xFDF5E6 ; OldLace
$colors[109] = 0xFF0000 ; Red
$colors[110] = 0xFF00FF ; Fuchsia
$colors[111] = 0xFF00FF ; Magenta
$colors[112] = 0xFF1493 ; DeepPink
$colors[113] = 0xFF4500 ; OrangeRed
$colors[114] = 0xFF6347 ; Tomato
$colors[115] = 0xFF69B4 ; HotPink
$colors[116] = 0xFF7F50 ; Coral
$colors[117] = 0xFF8C00 ; Darkorange
$colors[118] = 0xFFA07A ; LightSalmon
$colors[119] = 0xFFA500 ; Orange
$colors[120] = 0xFFB6C1 ; LightPink
$colors[121] = 0xFFC0CB ; Pink
$colors[122] = 0xFFD700 ; Gold
$colors[123] = 0xFFDAB9 ; PeachPuff
$colors[124] = 0xFFDEAD ; NavajoWhite
$colors[125] = 0xFFE4B5 ; Moccasin
$colors[126] = 0xFFE4C4 ; Bisque
$colors[127] = 0xFFE4E1 ; MistyRose
$colors[128] = 0xFFEBCD ; BlanchedAlmond
$colors[129] = 0xFFEFD5 ; PapayaWhip
$colors[130] = 0xFFF0F5 ; LavenderBlush
$colors[131] = 0xFFF5EE ; SeaShell
$colors[132] = 0xFFF8DC ; Cornsilk
$colors[133] = 0xFFFACD ; LemonChiffon
$colors[134] = 0xFFFAF0 ; FloralWhite
$colors[135] = 0xFFFAFA ; Snow
$colors[136] = 0xFFFF00 ; Yellow
$colors[137] = 0xFFFFE0 ; LightYellow
$colors[138] = 0xFFFFF0 ; Ivory
$colors[139] = 0xFFFFFF ; White




Global $hGUI = GUICreate("Colors Selector", 450, 451, 193, 125)
Global $hColors = GUICtrlCreateListView("Color", 0, 0, 450, 450)


GUICtrlSendMsg($hColors, 0x101E, 0, 429)
GUICtrlCreateListViewItem("Black", $hColors)
GUICtrlSetBkColor(-1, $colors[0])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("Navy", $hColors)
GUICtrlSetBkColor(-1, $colors[1])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("DarkBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[2])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("MediumBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[3])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("Blue", $hColors)
GUICtrlSetBkColor(-1, $colors[4])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("DarkGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[5])
GUICtrlCreateListViewItem("Green", $hColors)
GUICtrlSetBkColor(-1, $colors[6])
GUICtrlCreateListViewItem("Teal", $hColors)
GUICtrlSetBkColor(-1, $colors[7])
GUICtrlCreateListViewItem("DarkCyan", $hColors)
GUICtrlSetBkColor(-1, $colors[8])
GUICtrlCreateListViewItem("DeepSkyBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[9])
GUICtrlCreateListViewItem("DarkTurquoise", $hColors)
GUICtrlSetBkColor(-1, $colors[10])
GUICtrlCreateListViewItem("MediumSpringGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[11])
GUICtrlCreateListViewItem("Lime", $hColors)
GUICtrlSetBkColor(-1, $colors[12])
GUICtrlCreateListViewItem("SpringGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[13])
GUICtrlCreateListViewItem("Aqua", $hColors)
GUICtrlSetBkColor(-1, $colors[14])
GUICtrlCreateListViewItem("Cyan", $hColors)
GUICtrlSetBkColor(-1, $colors[15])
GUICtrlCreateListViewItem("MidnightBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[16])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("DodgerBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[17])
GUICtrlCreateListViewItem("LightSeaGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[18])
GUICtrlCreateListViewItem("ForestGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[19])
GUICtrlCreateListViewItem("SeaGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[20])
GUICtrlCreateListViewItem("DarkSlateGray", $hColors)
GUICtrlSetBkColor(-1, $colors[21])
GUICtrlCreateListViewItem("LimeGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[22])
GUICtrlCreateListViewItem("MediumSeaGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[23])
GUICtrlCreateListViewItem("Turquoise", $hColors)
GUICtrlSetBkColor(-1, $colors[24])
GUICtrlCreateListViewItem("RoyalBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[25])
GUICtrlCreateListViewItem("SteelBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[26])
GUICtrlCreateListViewItem("DarkSlateBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[27])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("MediumTurquoise", $hColors)
GUICtrlSetBkColor(-1, $colors[28])
GUICtrlCreateListViewItem("Indigo", $hColors)
GUICtrlSetBkColor(-1, $colors[29])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("DarkOliveGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[30])
GUICtrlCreateListViewItem("CadetBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[31])
GUICtrlCreateListViewItem("CornflowerBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[32])
GUICtrlCreateListViewItem("MediumAquaMarine", $hColors)
GUICtrlSetBkColor(-1, $colors[33])
GUICtrlCreateListViewItem("DimGray", $hColors)
GUICtrlSetBkColor(-1, $colors[34])
GUICtrlCreateListViewItem("SlateBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[35])
GUICtrlCreateListViewItem("OliveDrab", $hColors)
GUICtrlSetBkColor(-1, $colors[36])
GUICtrlCreateListViewItem("SlateGray", $hColors)
GUICtrlSetBkColor(-1, $colors[37])
GUICtrlCreateListViewItem("LightSlateGray", $hColors)
GUICtrlSetBkColor(-1, $colors[38])
GUICtrlCreateListViewItem("MediumSlateBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[39])
GUICtrlCreateListViewItem("LawnGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[40])
GUICtrlCreateListViewItem("Chartreuse", $hColors)
GUICtrlSetBkColor(-1, $colors[41])
GUICtrlCreateListViewItem("Aquamarine", $hColors)
GUICtrlSetBkColor(-1, $colors[42])
GUICtrlCreateListViewItem("Maroon", $hColors)
GUICtrlSetBkColor(-1, $colors[43])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("Purple", $hColors)
GUICtrlSetBkColor(-1, $colors[44])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("Olive", $hColors)
GUICtrlSetBkColor(-1, $colors[45])
GUICtrlCreateListViewItem("Gray", $hColors)
GUICtrlSetBkColor(-1, $colors[46])
GUICtrlCreateListViewItem("SkyBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[47])
GUICtrlCreateListViewItem("LightSkyBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[48])
GUICtrlCreateListViewItem("BlueViolet", $hColors)
GUICtrlSetBkColor(-1, $colors[49])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("DarkRed", $hColors)
GUICtrlSetBkColor(-1, $colors[50])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("DarkMagenta", $hColors)
GUICtrlSetBkColor(-1, $colors[51])
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateListViewItem("SaddleBrown", $hColors)
GUICtrlSetBkColor(-1, $colors[52])
GUICtrlCreateListViewItem("DarkSeaGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[53])
GUICtrlCreateListViewItem("LightGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[54])
GUICtrlCreateListViewItem("MediumPurple", $hColors)
GUICtrlSetBkColor(-1, $colors[55])
GUICtrlCreateListViewItem("DarkViolet", $hColors)
GUICtrlSetBkColor(-1, $colors[56])
GUICtrlCreateListViewItem("PaleGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[57])
GUICtrlCreateListViewItem("DarkOrchid", $hColors)
GUICtrlSetBkColor(-1, $colors[58])
GUICtrlCreateListViewItem("YellowGreen", $hColors)
GUICtrlSetBkColor(-1, $colors[59])
GUICtrlCreateListViewItem("Sienna", $hColors)
GUICtrlSetBkColor(-1, $colors[60])
GUICtrlCreateListViewItem("Brown", $hColors)
GUICtrlSetBkColor(-1, $colors[61])
GUICtrlCreateListViewItem("DarkGray", $hColors)
GUICtrlSetBkColor(-1, $colors[62])
GUICtrlCreateListViewItem("LightBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[63])
GUICtrlCreateListViewItem("GreenYellow", $hColors)
GUICtrlSetBkColor(-1, $colors[64])
GUICtrlCreateListViewItem("PaleTurquoise", $hColors)
GUICtrlSetBkColor(-1, $colors[65])
GUICtrlCreateListViewItem("LightSteelBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[66])
GUICtrlCreateListViewItem("PowderBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[67])
GUICtrlCreateListViewItem("FireBrick", $hColors)
GUICtrlSetBkColor(-1, $colors[68])
GUICtrlCreateListViewItem("DarkGoldenRod", $hColors)
GUICtrlSetBkColor(-1, $colors[69])
GUICtrlCreateListViewItem("MediumOrchid", $hColors)
GUICtrlSetBkColor(-1, $colors[70])
GUICtrlCreateListViewItem("RosyBrown", $hColors)
GUICtrlSetBkColor(-1, $colors[71])
GUICtrlCreateListViewItem("DarkKhaki", $hColors)
GUICtrlSetBkColor(-1, $colors[72])
GUICtrlCreateListViewItem("Silver", $hColors)
GUICtrlSetBkColor(-1, $colors[73])
GUICtrlCreateListViewItem("MediumVioletRed", $hColors)
GUICtrlSetBkColor(-1, $colors[74])
GUICtrlCreateListViewItem("IndianRed", $hColors)
GUICtrlSetBkColor(-1, $colors[75])
GUICtrlCreateListViewItem("Peru", $hColors)
GUICtrlSetBkColor(-1, $colors[76])
GUICtrlCreateListViewItem("Chocolate", $hColors)
GUICtrlSetBkColor(-1, $colors[77])
GUICtrlCreateListViewItem("Tan", $hColors)
GUICtrlSetBkColor(-1, $colors[78])
GUICtrlCreateListViewItem("LightGrey", $hColors)
GUICtrlSetBkColor(-1, $colors[79])
GUICtrlCreateListViewItem("PaleVioletRed", $hColors)
GUICtrlSetBkColor(-1, $colors[80])
GUICtrlCreateListViewItem("Thistle", $hColors)
GUICtrlSetBkColor(-1, $colors[81])
GUICtrlCreateListViewItem("Orchid", $hColors)
GUICtrlSetBkColor(-1, $colors[82])
GUICtrlCreateListViewItem("GoldenRod", $hColors)
GUICtrlSetBkColor(-1, $colors[83])
GUICtrlCreateListViewItem("Crimson", $hColors)
GUICtrlSetBkColor(-1, $colors[84])
GUICtrlCreateListViewItem("Gainsboro", $hColors)
GUICtrlSetBkColor(-1, $colors[85])
GUICtrlCreateListViewItem("Plum", $hColors)
GUICtrlSetBkColor(-1, $colors[86])
GUICtrlCreateListViewItem("BurlyWood", $hColors)
GUICtrlSetBkColor(-1, $colors[87])
GUICtrlCreateListViewItem("LightCyan", $hColors)
GUICtrlSetBkColor(-1, $colors[88])
GUICtrlCreateListViewItem("Lavender", $hColors)
GUICtrlSetBkColor(-1, $colors[89])
GUICtrlCreateListViewItem("DarkSalmon", $hColors)
GUICtrlSetBkColor(-1, $colors[90])
GUICtrlCreateListViewItem("Violet", $hColors)
GUICtrlSetBkColor(-1, $colors[91])
GUICtrlCreateListViewItem("PaleGoldenRod", $hColors)
GUICtrlSetBkColor(-1, $colors[92])
GUICtrlCreateListViewItem("LightCoral", $hColors)
GUICtrlSetBkColor(-1, $colors[93])
GUICtrlCreateListViewItem("Khaki", $hColors)
GUICtrlSetBkColor(-1, $colors[94])
GUICtrlCreateListViewItem("AliceBlue", $hColors)
GUICtrlSetBkColor(-1, $colors[95])
GUICtrlCreateListViewItem("HoneyDew", $hColors)
GUICtrlSetBkColor(-1, $colors[96])
GUICtrlCreateListViewItem("Azure", $hColors)
GUICtrlSetBkColor(-1, $colors[97])
GUICtrlCreateListViewItem("SandyBrown", $hColors)
GUICtrlSetBkColor(-1, $colors[98])
GUICtrlCreateListViewItem("Wheat", $hColors)
GUICtrlSetBkColor(-1, $colors[99])
GUICtrlCreateListViewItem("Beige", $hColors)
GUICtrlSetBkColor(-1, $colors[100])
GUICtrlCreateListViewItem("WhiteSmoke", $hColors)
GUICtrlSetBkColor(-1, $colors[101])
GUICtrlCreateListViewItem("MintCream", $hColors)
GUICtrlSetBkColor(-1, $colors[102])
GUICtrlCreateListViewItem("GhostWhite", $hColors)
GUICtrlSetBkColor(-1, $colors[103])
GUICtrlCreateListViewItem("Salmon", $hColors)
GUICtrlSetBkColor(-1, $colors[104])
GUICtrlCreateListViewItem("AntiqueWhite", $hColors)
GUICtrlSetBkColor(-1, $colors[105])
GUICtrlCreateListViewItem("Linen", $hColors)
GUICtrlSetBkColor(-1, $colors[106])
GUICtrlCreateListViewItem("LightGoldenRodYellow", $hColors)
GUICtrlSetBkColor(-1, $colors[107])
GUICtrlCreateListViewItem("OldLace", $hColors)
GUICtrlSetBkColor(-1, $colors[108])
GUICtrlCreateListViewItem("Red", $hColors)
GUICtrlSetBkColor(-1, $colors[109])
GUICtrlCreateListViewItem("Fuchsia", $hColors)
GUICtrlSetBkColor(-1, $colors[110])
GUICtrlCreateListViewItem("Magenta", $hColors)
GUICtrlSetBkColor(-1, $colors[111])
GUICtrlCreateListViewItem("DeepPink", $hColors)
GUICtrlSetBkColor(-1, $colors[112])
GUICtrlCreateListViewItem("OrangeRed", $hColors)
GUICtrlSetBkColor(-1, $colors[113])
GUICtrlCreateListViewItem("Tomato", $hColors)
GUICtrlSetBkColor(-1, $colors[114])
GUICtrlCreateListViewItem("HotPink", $hColors)
GUICtrlSetBkColor(-1, $colors[115])
GUICtrlCreateListViewItem("Coral", $hColors)
GUICtrlSetBkColor(-1, $colors[116])
GUICtrlCreateListViewItem("Darkorange", $hColors)
GUICtrlSetBkColor(-1, $colors[117])
GUICtrlCreateListViewItem("LightSalmon", $hColors)
GUICtrlSetBkColor(-1, $colors[118])
GUICtrlCreateListViewItem("Orange", $hColors)
GUICtrlSetBkColor(-1, $colors[119])
GUICtrlCreateListViewItem("LightPink", $hColors)
GUICtrlSetBkColor(-1, $colors[120])
GUICtrlCreateListViewItem("Pink", $hColors)
GUICtrlSetBkColor(-1, $colors[121])
GUICtrlCreateListViewItem("Gold", $hColors)
GUICtrlSetBkColor(-1, $colors[122])
GUICtrlCreateListViewItem("PeachPuff", $hColors)
GUICtrlSetBkColor(-1, $colors[123])
GUICtrlCreateListViewItem("NavajoWhite", $hColors)
GUICtrlSetBkColor(-1, $colors[124])
GUICtrlCreateListViewItem("Moccasin", $hColors)
GUICtrlSetBkColor(-1, $colors[125])
GUICtrlCreateListViewItem("Bisque", $hColors)
GUICtrlSetBkColor(-1, $colors[126])
GUICtrlCreateListViewItem("MistyRose", $hColors)
GUICtrlSetBkColor(-1, $colors[127])
GUICtrlCreateListViewItem("BlanchedAlmond", $hColors)
GUICtrlSetBkColor(-1, $colors[128])
GUICtrlCreateListViewItem("PapayaWhip", $hColors)
GUICtrlSetBkColor(-1, $colors[129])
GUICtrlCreateListViewItem("LavenderBlush", $hColors)
GUICtrlSetBkColor(-1, $colors[130])
GUICtrlCreateListViewItem("SeaShell", $hColors)
GUICtrlSetBkColor(-1, $colors[131])
GUICtrlCreateListViewItem("Cornsilk", $hColors)
GUICtrlSetBkColor(-1, $colors[132])
GUICtrlCreateListViewItem("LemonChiffon", $hColors)
GUICtrlSetBkColor(-1, $colors[133])
GUICtrlCreateListViewItem("FloralWhite", $hColors)
GUICtrlSetBkColor(-1, $colors[134])
GUICtrlCreateListViewItem("Snow", $hColors)
GUICtrlSetBkColor(-1, $colors[135])
GUICtrlCreateListViewItem("Yellow", $hColors)
GUICtrlSetBkColor(-1, $colors[136])
GUICtrlCreateListViewItem("LightYellow", $hColors)
GUICtrlSetBkColor(-1, $colors[137])
GUICtrlCreateListViewItem("Ivory", $hColors)
GUICtrlSetBkColor(-1, $colors[138])
GUICtrlCreateListViewItem("White", $hColors)
GUICtrlSetBkColor(-1, $colors[139])




GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")


While 1
$nMsg = GUIGetMsg()
        Switch $nMsg
Case $GUI_EVENT_CLOSE
                Exit
EndSwitch
WEnd


Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam
    Local $hWndFrom, $iCode, $tNMHDR, $hWndListView, $tInfo


    $hWndListView = GUICtrlGetHandle($hColors)
    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        Case $hWndListView
            Switch $iCode
                Case $NM_DBLCLK
                    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
                    $index = DllStructGetData($tInfo, "Index")


                    ClipPut (StringReplace(hex($colors[$index]), 2, "x"))


                    If ClipGet() = (StringReplace(hex($colors[$index]), 2, "x")) Then
                        MsgBox($MB_SYSTEMMODAL, "Information", "Code of " & _GUICtrlListView_GetItemText($hColors, $index) & " color is in clipboard.")
                    EndIf
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY
Edited by tobiczech

[font="verdana, geneva, sans-serif;"]English isn’t my first language, so please excuse any mistakes.[/font]

Share this post


Link to post
Share on other sites
JLogan3o13

It's evident you have put a lot of work into this. Just curious if you can expand on what functionality your script provides that goes beyond the built-in _ChooseColor() function?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
tobiczech

It's evident you have put a lot of work into this. Just curious if you can expand on what functionality your script provides that goes beyond the built-in _ChooseColor() function?

 

Oh, now yes

http://www.autoitscript.com/autoit3/docs/libfunctions/_ChooseColor.htm


[font="verdana, geneva, sans-serif;"]English isn’t my first language, so please excuse any mistakes.[/font]

Share this post


Link to post
Share on other sites
Jos

It's evident you have put a lot of work into this. Just curious if you can expand on what functionality your script provides that goes beyond the built-in _ChooseColor() function?

Spoilsport ... :)

  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×