Control button layout change in Prefs window

I've had this hotkey thru autohotkey ...

else if WinExist("Preferences - Directory Opus") ;; f11::One Press
				ControlClick, Button1, Preferences - Directory Opus, , Left, 1, na

it closes the prefs window by clicking the OK button Button1 as windows spy tells.

its no long Button1 and it changes each time the page changes.

I've had this kotkey set up for 1.5+years. is there any the there Button#s in prefs can be made static??

thanks
X

well I was tinkering in AHK with this and it is still works if I use the button names,

ControlClick, Button1, Preferences - Directory Opus, , Left, 1, na

ControlClick, OK, Preferences - Directory Opus, OK, Left, 1, na

I love this button, it's a toggle, dopus open the window, ahk closes with the same key, it doesn't even need to be active.