That was /exactly/ my concern when I asked "how did you do that". As far as I know, in the
"classic" PE a ptr read in a background window will just block.

With QPTR, this works (on QPC & SMSQmulator) even when bgio is switched off:

100 OPEN_NEW#0,"con"
110 WINDOW#0,0,0,0,0
120 OUTLN#0,0,0,0,0
130 REPeat lp%
140    term%=48
150    RPTR #0,xabs%,yabs%,term%,swnum%,xrel%,yrel%,bt$
170    IF yabs%>SCR_YLIM-50:BEEP 7000,10
180    PAUSE 150
190 END REPeat lp%

wolfgang
Great! Thanks. (For anyone wanting info about the RPTR parameters it's on page 38 of my QPTR ref guide)

While tinkering with the Easyptr equivalent, I think I may have found a bug in Easyptr's RDPT command:

RDPT #chan%,tvec%,xpos%,ypos%

Should return the absolute pointer coordinate in xpos% and ypos% if passed positive. It does indeed if pointer position changes for xpos%, but not for ypos%, which always keeps the calling value.

ptrmenr_cde 4.09 - just to give Marcel a migraine ;-)

Easily worked around by using DIM pr%(15) : PVAL #chan%,pr% : ypos% = pr%(15)

(always assuming it's not a bug in the first place and just me being totally stupid as usual).

Dilwyn
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to