Won't Click On Dialogue Boxes


I am trying to make a Touch Bar button in the music notation software program, Finale, that will open a dialogue box from a keyboard shortcut, and then click a button in said box. The box always comes up in the same place so I had no problem programming the cursor to move to the desired position; however, once in that position, it simply won't click. I have tried this with multiple different dialogue boxes. Any help would be much appreciated!


Update: I just realized if I click the button twice it will click; however, this is not a perfect solution as I wanted to add more actions following the click.