General
set "Color On" and "Color Off" for CustomButton in script
Started by AmokCop-Rob on .
Sign in or create an account to join the conversation.
Hi,
so I can set the color of my CustomButton objects in a script like so:
so I can set the color of my CustomButton objects in a script like so:
setattribute(GridButton56, 'color', RGB(1, 1, 1));
But how would I set Color On and Color Off ???Subject: Re: set "Color On" and "Color Off" for CustomButton in scrip
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)
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.