Post Reply 
Is there a way to sense when the screen is touched?
01-20-2014, 09:52 PM
Post: #1
Is there a way to sense when the screen is touched?
Something akin to ISKEYDOWN.

Page 558 of the User Guide.

Thanks in advance for any help.

Happy coding and may you see ' i No errors in the program ' with every compilation.
Find all posts by this user
Quote this message in a reply
01-21-2014, 02:23 AM (This post was last modified: 01-21-2014 02:24 AM by tgallo.)
Post: #2
RE: Is there a way to sense when the screen is touched?
you need to constantly be checking in a loop



local touch, X, Y;

WHILE ISKEYDOWN(4)<>1 do
wait(.1);
touch:=mouse();

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;
Find all posts by this user
Quote this message in a reply
01-21-2014, 02:49 AM (This post was last modified: 01-21-2014 02:49 AM by Han.)
Post: #3
RE: Is there a way to sense when the screen is touched?
You can also use WAIT(-1) which handles both keys and mouse events.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-21-2014, 06:05 AM
Post: #4
RE: Is there a way to sense when the screen is touched?
Thank you both for your help.

Happy coding and may you see ' i No errors in the program ' with every compilation.
Find all posts by this user
Quote this message in a reply
Post Reply 




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