04-05-2024, 11:04 AM
Can the Screen(row,column) function be used to find the character at a screen location after using _newImage and setting a font?
When I try to run these few lines, I don't get the results I expect:
When I try to run these few lines, I don't get the results I expect:
Code: (Select All)
WWidth = 1120: WHeight = 820: Mode = 32: Size = 24
Screen _NewImage(WWidth, WHeight, Mode)
SetFont: f& = _LoadFont("C:\WINDOWS\fonts\courbd.ttf", Size, "monospace"): _Font f&
Locate 15, 40: Print "X"
p% = Screen(15, 40)
Print "screen(15,40) is"; p%: Sleep
' with lines 3 and 4 both in, an Illegal Function message is shown.
' with line 3 in, and line 4 out, the char number is reported as 219.
' with line 4 in and line 3 out, the expected code (88) is shown.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/