Page 1 of 1

set "Color On" and "Color Off" for CustomButton in script

Posted: 18 Mar 2017 19:29
by AmokCop-Rob
Hi,

so I can set the color of my CustomButton objects in a script like so:

Code: Select all

setattribute(GridButton56, 'color', RGB(1, 1, 1));
But how would I set Color On and Color Off ???

Re: set "Color On" and "Color Off" for CustomButton in scrip

Posted: 19 Mar 2017 09:53
by AmokCop-Rob
Alright,

so the attribute is color and the value is an array of two color. The following example sets the "Color Off" to white (1, 1, 1) and "Color On" to green (0, 1, 0)

Code: Select all

setattribute(getobject(), 'color', {RGB(1, 1, 1), RGB(0, 1, 0)});
I am using getobject() to access the object the script resides in as opposed to the objects name.