General

Something like "this" when Scritping

Started by AmokCop-Rob on .

Sign in or create an account to join the conversation.

2 posts

Topic starter
Hi,

so when scripting something like:
setattribute(GridButton56, 'color', RGB(1, 1, 1));
I want to replace the name of the component (here GridButton56) with the name of the component the script is in, e. g.
setattribute(this, 'color', RGB(1, 1, 1));
Cheers,

Rob
Oh, damn. I should have read the documentation more carefully
getobject()
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 ;)