Skip to Content
author's profile photo Former Member
Former Member

Get Name of Object (me.name?)

Hi All,

Im hoping someone has come up with a solution to this problem in the past.

I have a number of objects named XX_1, XX_2, XX_3 ect.

I would really like to be able to access that name in script, something like XX_1.GetName(), in the same way to can access the text value using GetText()

Is seems so simple and would allow me to copy and paste a series of on click events, rather than modify each one to increment by one each time I paste it into my application.

Many Thanks

John

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 16, 2015 at 01:24 PM

    Hi John,

    Can you be a little clearer as to what you are trying to achieve? Especially what you would like to achieve via scripting with the object name to allow you to "copy and paste a series of on click events, rather than modify each one to increment by one each time I paste it into my application"?

    If your goal is to define a common set of event handlers for multiple objects in order to perform script actions on them, then you can achieve this by defining Global Script Functions. If the actions are specific to a particular object type, such as a Button then you can define this as a parameter (as well as other parameters needed to process the action) and then call the function from the event script. An example is shown below:

    Regards,

    Mustafa.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.