We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GraphicsWindow.LastKey
#5
LitDev,

This snippet works now. I agree. "Strange"

GW.Show()
While key <> "Return"
key = GraphicsWindow.Lastkey
EndWhile
TextWindow.WriteLine("H")

I am pretty sure in my program that the LDTextWindow.SendKey doesn't reset GraphicsWindow.LastKey. I put a TW.Writeline(GraphicsWindow.LastKey in front of the wait loop and for the second run of the program it shows the "Return" key. It should show the space key, but doesn't.

Would it be possible in the extension under utilities to add a reset function to GraphicsWindow.LastKey?

JR

Here is what I have in the actual program:

'TW.WriteLine(GraphicsWindow.LastKey)
While key <> "Return"
key = GraphicsWindow.Lastkey
EndWhile
Program.Delay(10)
LDTextWindow.SendKey(GraphicsWindow.Title,"Space") 'Send a Space key so initially LastKey is not Return
Program.Delay(10)
key=GraphicsWindow.LastKey
TW.WriteLine(key)

It never shows "Space as the last key. Only "Return"
Reply


Messages In This Thread
GraphicsWindow.LastKey - by jrmrhrb00 - 01-15-2025, 01:37 PM
RE: GraphicsWindow.LastKey - by litdev - 01-15-2025, 02:09 PM
RE: GraphicsWindow.LastKey - by jrmrhrb00 - 01-15-2025, 02:58 PM
RE: GraphicsWindow.LastKey - by litdev - 01-15-2025, 03:18 PM
RE: GraphicsWindow.LastKey - by jrmrhrb00 - 01-15-2025, 03:58 PM
RE: GraphicsWindow.LastKey - by litdev - 01-15-2025, 05:05 PM
RE: GraphicsWindow.LastKey - by jrmrhrb00 - 01-15-2025, 05:33 PM
RE: GraphicsWindow.LastKey - by litdev - 01-15-2025, 06:47 PM
RE: GraphicsWindow.LastKey - by jrmrhrb00 - 01-15-2025, 07:56 PM
RE: GraphicsWindow.LastKey - by litdev - 01-15-2025, 08:43 PM
RE: GraphicsWindow.LastKey - by AbsoluteBeginner - 01-16-2025, 07:58 AM
RE: GraphicsWindow.LastKey - by litdev - 01-16-2025, 11:59 AM
RE: GraphicsWindow.LastKey - by jrmrhrb00 - 01-16-2025, 02:36 PM
RE: GraphicsWindow.LastKey - by z-s - 01-17-2025, 05:02 PM
RE: GraphicsWindow.LastKey - by litdev - 01-17-2025, 07:24 PM
RE: GraphicsWindow.LastKey - by z-s - 01-18-2025, 10:29 AM
RE: GraphicsWindow.LastKey - by litdev - 01-18-2025, 01:41 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)