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.

2 posts

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.