範囲を書くなら(x1,y1)~(x2,y2)と書いたほうがいいですよ 左上端が(0,0)と見なして書くならば touch out tt,tx,ty if tt==0 then tx=-1:ty=-1 if (tx>=0 and tx<=30) and (ty>=0 and ty<=40) then beep でイケるはずです