When clicking f.i. a button It would be very usefull to be able to get the button's objectname, the segment of the button ( number ) and/or use Self.
This, of course, to pass it as a script parameter
I would slightly modify this to be: Get ( TriggerObjectName ) which would return:
1. the object name of a button that was clicked
2. the script name of the previous script in the script stack, i.e. the calling script
3. the object name of a field or layout that triggers a script trigger
...and so on.
While waiting to have more information and therefore more control natively on the button bars, you can test (and perhaps adopt? ) a very nice tool that will save you a lot of time: BBT (ButtonBarTool) !
Retrieving data ...