Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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 comment
    10|10000 characters needed characters exceeded