| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#T)
The Define/Detect Touchscreen Area command performs several functions,
depending on the arguments it is passed. Cogsys uses the serial output
of the ELO Touchsystems 1725C to detect where it is on a 640-pixel-wide
by 480-pixel-high screen. Specifically-defined touch-sensitive areas
are squares whose centers and side lengths are passed to #T.
There is no indication on the screen that the #T command has
been invoked, much like the #R command. If you desire a place
indicating where the user is to touch, use #G to put a letter/word there,
or use #H to put a shape there, or use squarext.cxr,
circext.cxr, etc, to put other shapes in the desired location.
The timing for the Define/Detect Touchscreen Area (#T) begins with
the invoking of the command, and ends with the screen being touched, or the
@-key is pressed.
z or / if the left side
or right side of the screen is pressed
#T will return only after
the defined area for 'K' (or @) is pressed.
If two response areas overlap, then the key area whose center is closest to the touch is declared the 'response'.
If one or more areas have been defined, and the touch does not occur in any of the areas, then a 'y' is returned as the response key.
#T
#T ; #T[K,X,Y,S] ; #T[K]
COGVAR_KEY) is
updated with the letter code for a defined area. Cogsys variable
5 (COGVAR_TIME) is updated with the reaction time.
%M2 @C %A[X320,Y100,J2,F1] #G[Testing touchscreen press]#W500 %A[Y150]#G[Touch the left-half of the screen] #T@C %A[Y100]#G[You pressed a]%A[Y150]$SV7 %A[Y200]#G[after]%A[Y250]$SV5 %A[Y300]#G[milliseconds] #W3000@C %A[Y150]#G[Touch A B C or D] #T[A,50,400,50] %A[X50,Y400,J2,C15,F1]#G[A] #T[B,250,400,50] %A[X250]#G[B] #T[C,390,400,50] %A[X390]#G[C] #T[D,590,400,50] %A[X590]#G[D] #T@C %A[X320,Y100]#G[You pressed a] %A[Y150]$SV7%A[Y200]#G[after]%A[Y250]$SV5 %A[Y300]#G[milliseconds] #W3000@C %A[Y150]#G[Touch the square on the left or right] #T[z,250,200,50]#T[/,390,200,50] %A[X250,Y200,J2,S50,C15,F1]#H[]%A[X390]#H[] #T@C %A[X320,Y100]#G[You pressed a]%A[Y150]$SV7 %A[Y200]#G[after]%A[Y250]$SV5 %A[Y300]#G[milliseconds] #W3000@C %A[Y150]#G[Touch anywhere on the screen] %A[Y200]#G[except for the square on the right,] %A[Y250]#G[then touch the square on the right] #T[z,250,400,50]#T[/,390,400,50] %A[X250,Y400,J2,S50,C15,F1]#H[]%A[X390]#H[] #T[/]@C %A[X320,Y100]#G[You pressed a]%A[Y150]$SV7 %A[Y200]#G[after]%A[Y250]$SV5 %A[Y300]#G[milliseconds] #W3000@C @C%A[Y200]#G[Done. Touch the screen to exit.]#T |
#T
/500
#T[d,100,100,60]
#T[d]
d750
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |