I started to wonder "What would happen if you touched outside any fields created on the text screen?"
The answer - the touch command works in those areas! My next step was to create a tiny field in the upper corner of the TEXT screen. Now I can tape anywhere on screen and read the coordinates. You can also detect touches of any number and use them to trigger actions.
Code: Select all
/* Touch in Text Mode rbytes, February 2019 */ FIELD "activate" TEXT "" AT 0,0 SIZE 1,1 PRINT "Touch with one finger to get screen coordinates in TEXT mode." PRINT "Touch with two fingers to quit." PRINT DO SLOWDOWN GET TOUCH 0 as x,y GET TOUCH 1 as ox,oy if x>-1 or y>-1 then print x,y if ox>-1 then end UNTIL 0