Writing from an editor Gadget

Just starting out? Need help? Post your questions and find answers here.
dsw
User
User
Posts: 10
Joined: Thu Feb 01, 2007 4:26 pm
Location: UK

Writing from an editor Gadget

Post by dsw »

Hi,
I'm still pretty much a beginner. I'm putting together a small app to read and write to a serial port. I can read from a string gadget and send that to the serial port ok, and I can write incoming text to the editor gadget.

However, if I want to write character by character as I type from the editor gadget to the serial port it does not seem at all straightforward.
This is for windows so should be I be looking at the API for keyboard or the editor controls?
If someone could just point me in the right direction as looking through the forum there seems to be a number of possibilities but I'm not sure which way to go.

Thanks
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Mmmm. From the editor gadget would indeed be a bit tricky... Either you would have to compare new and old contents of the gadget, and send the differences (not good) or grab and process keyboard input before passing it on.

What are you trying to build? A terminal app or something similar?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
dsw
User
User
Posts: 10
Joined: Thu Feb 01, 2007 4:26 pm
Location: UK

Post by dsw »

A terminal yes.
I can do what I want to already (talk to a PIC controller) using string gagets etc. but I thought it would be good to move it on a little, but I think I might be going a step too far for what I know.

Thanks for your survival guide BTW, it has been really useful
Post Reply