Is there a way to determine the invisible cursor position on the BBQL after a random number of AT calls or PRINT statements ?
I don't want the graphic x,y such as somewhere between 0 - 512 and 0 - 256
I am after finding the character position 0-80 odd and y axis 0-22 roughly.
so something like
a = peek_something (mem_loc): b = peek_something (mem_loc+2)
a = x value
b = y value
===================================================================
Also is there a way to look at vertical screen pixels simultaneously or does it have to be a pixel at a time?
>>>>>x
000001
010101
011101
010011
So i would like to read some like
a = PEEK_D (mem), x
print a
would display "1111"
Many thanks
Lee
Cursor Position (Invisible)
- Mr_Navigator
- QL Fanatic
- Posts: 782
- Joined: Mon Dec 13, 2010 11:17 pm
- Location: UK, Essex
- Contact:
Cursor Position (Invisible)
-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
Re: Cursor Position (Invisible)
Lee,
not without an S*BASIC extension.
Recommend you check DIYTK from Dilwyn's toolkits page. This has got an extension named CH_BASE that returns the base address of any channel definition block. For screen channels, this area of memory holds (amongst other interesting information) the cursor x and y position in character coordinates in the window.
Not sure I get your second question - Are you asking to peek screen pixels? In this case you need another variable from the channel definition block that holds the base address of the screen, then peek from there. Although it's not quite as simple as you may want it - color and flash bits are inter-mixed and extracting the exact color of a pixel is a bit more complicated than you might think.
If I remember right, DIY toolkit also had some functions to read screen pixels, to make your life a bit simpler.
Regards,
Tobias
not without an S*BASIC extension.
Recommend you check DIYTK from Dilwyn's toolkits page. This has got an extension named CH_BASE that returns the base address of any channel definition block. For screen channels, this area of memory holds (amongst other interesting information) the cursor x and y position in character coordinates in the window.
Not sure I get your second question - Are you asking to peek screen pixels? In this case you need another variable from the channel definition block that holds the base address of the screen, then peek from there. Although it's not quite as simple as you may want it - color and flash bits are inter-mixed and extracting the exact color of a pixel is a bit more complicated than you might think.
If I remember right, DIY toolkit also had some functions to read screen pixels, to make your life a bit simpler.
Regards,
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Cursor Position (Invisible)
As already mentioned, you need an external toolkit. I use one with the keywords CHAN_W% and CHAN_L, probably similar in function to Tobias'es CHAN_BASE. I think youll find this one or similar in a DIY Toolkit. However, older versions may not cater for the new GD2 drivers used by Wman and SMSQ/E, which use an extended channel definition block. It shouldnt matter in this case, as these data are in the standard locations. Heres how you could use CHAN_W%:I am after finding the character position 0-80 odd and y axis 0-22 roughly.
Code: Select all
deffn SD_XPOS(ch) : ret CHAN_W%(#ch; 82): enddef: rem cursor X position
deffn SD_YPOS(ch) : ret CHAN_W%(#ch; 84): enddef: rem cursor Y position

Per
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen