it it not nessary to make a test each frame, but you can check after click/touch or each 1/4 sec. or only if the pointer moves.
i would add this text ids into an array and give this array a function, the function loop through all elements and exit fornext if found an id, the func return this id or 0.
else if you make a menu you can divide the mouse y by item count. print(trunc(getpointery() / 10))
function check(myarray ref as integer[],x as float,y as float)
ret =0
for i = 0 to myarray.length
ret=gettexthit(myarray[i],x,y)
if ret then exit
next
endfunction ret
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)