Forum Discussion
jorgesimoes1983
13 years agoRegular Contributor
You can use something like this:
function CorrectRGBComponent(component)
{
component = aqConvert.VarToInt(component);
if (component < 0)
component = 0;
else
if (component > 255)
component = 255;
return component;
}
function RGB(r, g, b)
{
r = CorrectRGBComponent(r);
g = CorrectRGBComponent(g);
b = CorrectRGBComponent(b);
return r | (g << 8) | (b << 16);
}
function msg(text, addinfo, backgroundcolor, textcolor)
{
var Attr;
Attr = Log.CreateNewAttributes();
Attr.Bold = true;
Attr.Italic = true;
Attr.FontColor = RGB(192, 0, 0);
Attr.BackColor = RGB(255, 255, 0);
Log.Message(text, addinfo, pmNormal, Attr);
}
}
function CorrectRGBComponent(component)
{
component = aqConvert.VarToInt(component);
if (component < 0)
component = 0;
else
if (component > 255)
component = 255;
return component;
}
function RGB(r, g, b)
{
r = CorrectRGBComponent(r);
g = CorrectRGBComponent(g);
b = CorrectRGBComponent(b);
return r | (g << 8) | (b << 16);
}
function msg(text, addinfo, backgroundcolor, textcolor)
{
var Attr;
Attr = Log.CreateNewAttributes();
Attr.Bold = true;
Attr.Italic = true;
Attr.FontColor = RGB(192, 0, 0);
Attr.BackColor = RGB(255, 255, 0);
Log.Message(text, addinfo, pmNormal, Attr);
}
}