Hi, interesting.
For the first one, GW needs to be present and it seems that processessing of the key takes some time to fire and register async events by the OS, so some delays let it filter through.
For second one, it works for me when GW.Show() is used.
For the first one, GW needs to be present and it seems that processessing of the key takes some time to fire and register async events by the OS, so some delays let it filter through.
Code:
GraphicsWindow.Show()
While key <> "Return"
key = GraphicsWindow.Lastkey
Program.Delay(10)
EndWhile
LDTextWindow.SendKey(GraphicsWindow.Title,"Space") 'Send a Space key so initially LastKey is not Return
Program.Delay(10)
key=GraphicsWindow.LastKey
TW.WriteLine(key)
For second one, it works for me when GW.Show() is used.
Code:
GW.Show()
While key <> "Return"
key = GraphicsWindow.Lastkey
EndWhile
TextWindow.WriteLine("H")