1

In Windows forms and HTML textboxes, it is not possible to append text without influencing the current user action on the same textbox.

My usecase is that i get constantly new (from speech to text app) text and need to present the last 3 lines on a public screen. Those most recent 3 lines are subject to be changed by a human live editor. All actions the human editor does are visible for the public viewers.

My current approach is to develop 2 applications, a sender and an editor app. The sender app is receiving the inputs from the speech to text application which inserts sentence by sentence. The receiving application receives each letter/sentence and adds it to the editors textbox.

I cannot imagine that it works to just store and restore the carret position of the editors textbox when appending new text to the editors textbox.

Any idea how to make this work: constantly apply new text to a textbox that is currently being edited by human?

My current approach is to develop a "sender" and a "receiver" application. The sender takes the new content and posts it to the receiver. But how to insert the new text at the receiver side without influencing the current users interaction?

Basically google docs can do this but in my case the latency between sender and receiver textbox should be under 10ms or best without latency.

  • "I cannot imagine that it works to just store and restore the carret position of the editors textbox when appending new text to the editors textbox" - did you try it? because that seems to be the solution to me – Mawg Aug 21 '18 at 11:39
  • 1
    Well it definitely does not work to set caret position as i cannot control the time when users write stuff, nor can i block any user interaction. My current approach is to implement my own google docs... – Harry Aug 21 '18 at 18:13
0

Don't allow 2 inputs at the same time: from receiver, from user keyboard. Allow only from keyboard. And other way must go to the second textfield. When user ends keyboard using (eg pause 10 sec), app can merge second field with main field. Then user begins using keyboard, and app gets text from receiver to second field again.

  • Sorry, cannot block any user at any time :-( – Harry Aug 21 '18 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.