Rich Mellor wrote:

On 10/01/2011 15:00, Rich Mellor wrote:
On 10/01/2011 14:50, gdgqler wrote:
On 10 Jan 2011, at 14:32, Lee Privett wrote:

In QDOS/SMSQ/E the 'AT' keyword allows the print statement an imaginary y/x character cursor location to be used. Is there away of knowing where this is as a function?

for example:

10 AT 10,20 PRINT "FRED";
20 PRINT LOCX : remark this would return 24
30 PRINT LOCY: remark this would return 20


10 AT 10,20 PRINT "FRED"
20 PRINT LOCX : remark this would return 1 (or 0)
30 PRINT LOCY: remark this would return 11

I don't know of any extensions which contain functions like LOCX and LOCY. The trap #3 call SD_CHENQ returns the cursor position in characters. It would therefore be easy to produce the keywords LOCX and LOCY.

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




I had a quick look through my SBASIC/SuperBASIC Reference Manual and can't find anything.

I am sure I wrote a small function (CURSOR_POSX and CURSOR_POSY) to get at these values but which program I used it in, I can't think for the life of me!.


Of course, there is an easier way...

Use the CHANS toolkit from DIY toolkit (volume C) and then use

PRINT CHAN_W%(#3,34) to grab the x position on channel #3
PRINT CHAN_W%(#3,36) to grab the y position on channel #3

Or try

PRINT CHAN_W%(#ch; 82): rem SD_XPOS
PRINT CHAN_W%(#ch; 84): rem SD_YPOS

for position in cursor coordinates, which is what I think you want.

It may be possible to do this without a toolkit by using the extended PEEK commands found in SMSQ/E and Minerva. I havnt tried, though.

Per

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

Reply via email to