Welcome to the free version of color pickin chooser!

While I have personally left this behind, concentrating my efforts on color pickin chooser pro, you can still have some fun with it! Full source and documentation included. En-Joy!

Usage..

As a stand-alone application:

Compile and run, or easier still, run the pre-compiled .exe!

If you are compiling yourself, remember to include the icons (in the zip) or else your tool buttons won't be painted. As far as I know, only AutoIt3Wrapper can put extra icons inside compiled exe files.

For everything to work as expected, you must keep the icon order exactly as is in my compile directives..

	#AutoIt3Wrapper_Res_Icon_Add = img\icons\grad.ico
	#AutoIt3Wrapper_Res_Icon_Add = img\icons\mag.ico
	#AutoIt3Wrapper_Res_Icon_Add = img\icons\hex.ico

Replacing the file paths with wherever you keep them, of course.

You'll also need to remove or replace the FileInstall commands (sample images and tips) with your own paths, or else you will get compile errors. You'll need my "corz_" includes in your includes folder, too. Or else specify alternative paths to them. I think that's about it.

The exe is clean, if you want to save yourself some work.

As an include:

For use in your own applications, see above notes, but remember to instead include the icons in your MASTER APPLICATION'S compile directives. I've coded cpc so you can work on it as an stand-alone application or an include without any editing or fiddling around, once it's got the right paths setup, that is. Then..

In your master application, include the color pickin chooser..

	#include <color pickin chooser.au3>

Then, whenever you need a color, call the function ..

	$new_color = ColorPickinChooser()

When you close the color pickin chooser (by clicking "done!"), the picked color will be in $new_color. If the user closes color pickin chooser with the "x" button, the return value is as if no color was picked (see 'return value', below).

IMPORTANT:

If you are compiling this yourself, you need to use "AutoIt Wrapper" to add the extra icons. You will also need to use AT LEAST version 1.9.3 of AutoIt Wrapper for the paths to work correctly. You can download it here.

Input parameters..

When calling the color picking chooser, you can specify a few things, namely; the color to select, the group to select, whether or not to return an AutoIt value, and the name of a function you want run periodically. All parameters are optional..

ColorPickinChooser([$set_color[, $scheme[, $autoit_val[, $func]]]])


$set_color {string}

(defaults to last picked color - saved in cpc ini)

Set the initial colour to this. 6-digit RGB Hex value. you can also send an AutoIt RGB value, if you really must.

You can send an empty string "" to set the default color.

$scheme {string}

(defaults to last selected color group - saved in cpc ini)

Name of color group to load into the color wells.

If your application has color schemes, send the name of the scheme to the color pickin chooser, and if it has a color group of that name (hint: you made one - probably by dragging an ini file into the chooser), it will load that group automatically. Nize.

Tip: import clock's schemes.ini file for a bunch of ready-made color groups that happen to exactly match your clock color schemes! They will also have all the scheme's colors, with the correct names, for face, hour hand, etc, even comments. Did I hear "Handy"?

You can use an empty string "" to set the default scheme.

$autoit_val {boolean}

(true.. '0xFFFFFF', false.. 'FFFFFF', defaults to false)

Rather than return a web hex value, return an AutoIt color.

You can also use "" to set the default.

$func {string}

(defaults to an empty string, and performs no function)

The name of a functions you would like to perform periodically

If your application has any time-dependant activities, you can send the name of a function you would like called. The function will be called on every loop, around ten times a second.

corz clock uses this facility to keep itself updated, and give the vague appearance of multi-threading.

Return value: An RGB hex color value, e.g. #FF9900

If no color was picked (nothing changed) cpc returns the original color that was sent ($set_color).

If no color was sent by the calling application, and no color was picked, cpc returns an empty string.

NOTE: If you need the color in a different format, check out ConvertColorValue(), in <corz_colors.au3>

Usage examples:

Simple usage:

	$color = ColorPickinChooser()

The color pickin chooser will remember the last picked color, last selected color group, even the last magnified region, so the simple usage is perfectly acceptable; color pickin chooser can take care of the details.

Specifying only an AutoIt return value:

	$color = ColorPickinChooser("", "", true)

Specifying color and color group values, returning an AutoIt value:

	$color = ColorPickinChooser("FFFFFF", "basic colors", true)

Specifying only a function to call:

	$color = ColorPickinChooser("", "", "", "MyFunction")
etc.

Have fun!

;o) Cor