Post Reply 
Testing the touch screen
05-24-2015, 09:55 AM
Post: #2
RE: Testing the touch screen
(05-24-2015 07:55 AM)Digitaldreams Wrote:  ...
Note the fifth line that contains "▶ST.....in between the quotes there should be around 94 spaces. I see them when editing the post but not when viewing ??. This forum seems to strip out additional spaces !?. ...

The missing spaces should be visible, if you're entering the code between the code tags.
Code:
[code ] your code [/code ]
Code:
EXPORT Touchscreen()

BEGIN
  LOCAL TOUCH,ST;
  "                                                                                                    "▶ST;

  RECT_P();      //CLEAR SCREEN 
  TEXTOUT_P("TOUCH(1)=",0,0,0,#00FF00,300,0);
  TEXTOUT_P("TOUCH(2)=",0,32,0,#00FF00,300,0);
  TEXTOUT_P("Touch/Drag With One Or Two Fingers",0,90,0,#0000FF,300,0);
  TEXTOUT_P("ESC to exit",0,106,0,#0000FF,300,0);
  
  repeat       //CLEAR TOUCH BUFF
    TOUCH:=mouse();
  until size(TOUCH(1))=0;

  WHILE ISKEYDOWN(4)<>1 do    //ESC KEY ?
    TOUCH:=mouse();
    WAIT(0.1);
    TEXTOUT_P(ST,0,18,2,#00FF00,300,0);
    TEXTOUT_P(TOUCH(1),0,18,2,#00FF00,300,0);
    TEXTOUT_P(ST,0,50,2,#00FF00,300,0);
    TEXTOUT_P(TOUCH(2),0,50,2,#00FF00,300,0);
    
    // Example of obtaining decimal coordinates
    //   if size(TOUCH(1)) then
    //     if  TOUCH(1,5)==0 then
    //        X:=B→R(TOUCH(1,1));
    //        Y:=B→R(TOUCH(1,2));
    //     END;
    //   END;

  END;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Testing the touch screen - Digitaldreams - 05-24-2015, 07:55 AM
RE: Testing the touch screen - Thomas_Sch - 05-24-2015 09:55 AM
RE: Testing the touch screen - Joe Horn - 05-24-2015, 10:54 AM



User(s) browsing this thread: 1 Guest(s)