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

Discuss Lemur and share techniques.
Post Reply
AmokCop-Rob
Newbie
Posts: 4
Joined: 21 Feb 2017 10:15

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

Post 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 ???
AmokCop-Rob
Newbie
Posts: 4
Joined: 21 Feb 2017 10:15

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

Post 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.
Post Reply