UI Scripting - Poorly Labelled Interface

Say there are a number of buttons within a UI Element. Some have descriptions some do not. Depending on screen layout the button number for the first button with axds “help” may change.

If item y in the list of buttons of UI Element has axds “help”, and I want to select item x which always comes before item y regardless of screen layout and has no axds or any other descriptive property, exclusive to that button.

In the absence of a description is there a way I can select item x as the last button/item before (item y whose accessibility description is “help”) kind of thing?

Do you have a particular program in mind?

set myButtons to buttons of myUIElement
repeat with i from 1 to count myButtons
	try -- needed for buttons that don't have a description attribute
		if (description of item i of myButtons) = "help" then
			set buttonIWant to item (i - 1) of myButtons
			exit repeat
		end if
	end try
end repeat
get buttonIWant -- should be the button you want