Search found 4 matches
- 19 Mar 2017 09:53
- Forum: General Discussion
- Topic: set "Color On" and "Color Off" for CustomButton in script
- Replies: 1
- Views: 1803
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 ...
- 19 Mar 2017 09:40
- Forum: General Discussion
- Topic: Something like "this" when Scritping
- Replies: 1
- Views: 1583
Re: Something like "this" when Scritping
Oh, damn. I should have read the documentation more carefully
returns the object within which the script calling the function resides. This acts effectively as a ‘self’ reference.
This was what I was looking for
Code: Select all
getobject()
This was what I was looking for
- 19 Mar 2017 09:27
- Forum: General Discussion
- Topic: Something like "this" when Scritping
- Replies: 1
- Views: 1583
Something like "this" when Scritping
Hi,
so when scripting something like:
I want to replace the name of the component (here GridButton56) with the name of the component the script is in, e. g.
Cheers,
Rob
so when scripting something like:
Code: Select all
setattribute(GridButton56, 'color', RGB(1, 1, 1));
Code: Select all
setattribute(this, 'color', RGB(1, 1, 1));
Rob
- 18 Mar 2017 19:29
- Forum: General Discussion
- Topic: set "Color On" and "Color Off" for CustomButton in script
- Replies: 1
- Views: 1803
set "Color On" and "Color Off" for CustomButton in script
Hi,
so I can set the color of my CustomButton objects in a script like so:
But how would I set Color On and Color Off ???
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));