Windows color dialog box

Gilmichel

New member
Hello

A suggestion for update, will be to add a function to open windows color dialogbox because the html5 tag doesn’t work with chromium.

Thank-you !
 
wayos said:
There is this color palette, I do not know if it will help you.

uses jquery.
Yes, thank you, I have tested that script before and it does’n work with ExeOutPut, on myside …
 
Hi,

In last version, I have tested :
procedure StartIt;

var

CD: TColorDialog;

S: String;

begin

CD := TColorDialog.Create(nil);

CD.Execute(0);

S := inttostr(CD.Color);

ShowMessage(S);

CD.Free;

end;
But the answer is :
Unknown identifier or variable is not declared “TColorDialog”:

Gilbert
 
Last edited:
Now the problem is, how can I php echo the code ?

I mean I obtain the code with ShowMessage(S), but If I use Result := S it only shows the number 1…
 
Last edited:
You could store the result into a global variable:
procedure StartIt;

var

CD: TColorDialog;

S: String;

begin

CD := TColorDialog.Create(nil);

CD.Execute(0);

S := inttostr(CD.Color);

SetGlobalVar(“colorchoice”, S, false);

CD.Free;

end;
Then, you can get the value with PHP:
Code:
echo exo_getglobalvariable('colorchoice', '');
 
Ok. I have it, in php :
function fromRGB($R, $G, $B)
{
Code:
$R = dechex($R);
if (strlen($R)<2)
$R = '0'.$R;

$G = dechex($G);
if (strlen($G)<2)
$G = '0'.$G;

$B = dechex($B);
if (strlen($B)<2)
$B = '0'.$B;

return '#' . $R . $G . $B;
}
Then :
$color = exo_runhescriptcom(‘MainUser.StartIt’);
$result = exo_getglobalvariable(‘colorchoice’, ‘’);
echo fromRGB($result,“”,“”);
 
Last edited:
Back
Top