For a Frame object named frame1 containing two Button objects named myButton and myOtherButton, use either of the following syntax examples in a Script Action of the frame:
frame1.GetNextChild(myButton)// orthis.GetNextChild(myButton)