Clicking a button does not give it the focus. The only way that you can give a button the focus is to include it in the layout's tab order and then use the tab key to give it the focus.
If you want to pass the button's name to the button's script, pass it as a script parameter.
Thank you for your answer.
Looks like that will work. Will give feedback.