Give each of your buttons a script parameter that uniquely identifies that button.
If, by any chance, you are going to implement a layout of this type in FM GO on an iOS device, toss the buttons and use the new OnGestureTap trigger with it's associated get function that returns the coordinates of the user's tap on the touch screen.
Can you give me an example? I understand what you say but I don't know exactly how to do it.
Yes, I was aware of the FMGo solution.
Here's a calculator inside a popover demo: https://dl.dropboxusercontent.com/u/78737945/CalculaterPopoverDemo.fmp12
Many of the buttons perform the same script but pass a different value (such as a math operator or a numeric digit) to that script as a script parameter.
When you double click a button in the popover to open button setup, you'll find that the buttons use the Perform script option. If you click the select button, you'll get a dialog where you can enter an expression as the script parameter passed to that script. If you open up the scripts performed by the buttons in this popover, you'll find that the function Get ( ScriptParameter ) is used inside the script to access this data to use it in the script.
I can't open the example now but will do it later (I'm far from my Mac). But I'm not sure the solutions is what I need. Do you mean I have to manually pass a script parameter when clicking, always?
Maybe I'm not understanding and I will when I see the example.
What I expect us to define a single script that's called by any of the buttons (they are 100 identical ones) and that when clicked, the clicked button bounds property is stored in a field or variable.
So I'd like some way of automating the passing of the ObjectName or whatever value is neede so I just get this data. In other languages you can just say "me.bounds" or something similar and the value referees to the originating button's bounds without further problems.
Thanks a lot for your help, I will open the sample later
Each button would be set up to automatically pass its specified script parameter. On the calculator example, you click or tap the 1 button, a script parameter of 1 is passed to the script. you click or tap the 2, a script parameter of 2 is passed to that same script.