Trigger backspace ASCII code into TextEdit object via external controller
Hello.
I'm facing a difficulty with the TextEdit object.
I have made a lot of research around the forum and was not able to find a way to resolve my problem.
The idea is quite simple : I want to trigger different ASCII values with an external MIDI controller and by this way, write a sentence in a " TextEdit " object.
I made a patch which works fine, but I would also like to be able to use the " backspace " key messages to erase letters already in the TextEdit box. I can't figure out how could I achive this.
Does anyone has a clue?
The only soultion that I know of is using keystroke trigger externals.
like aka.keyboard or 11strokes.
BUT You must select text edit object using scripting,
to make it responsive to keystrokes.
Maybe somebody else has a better solution ?
Thanks a lot Source Audio.
I have tried with aka.keyboard without much success but with 11strokes, it seems to work fine.
Now I'm working on the second part of your suggestion.
I'm not much familiar with scripting but I guess the solution is with the use of "thispatcher" object.
I'm working on it.
Cheers!
Yes, You send thispatcher a message {script send (scripting name) select} .
But that will select the whole text entered in textedit object.
So next to do is to send right arrow keystroke so that text marker goes to the end,
then send backspace keystroke.
You are great Source Audio!
The logic your are employing to get the cursor is perfect!
I haven't tought about this.
Again, thank you very much for your help and your quick responses.
Best.
FWIW here's a version using a couple of zl objects and a gate
Yes, that is on one side handy, not needing any third party externals.
But You can't delete the first text item like that.
That can be easily fixed, inserting zl len and clearing textedit
and message, setting gate to 1st output etc, when list contains only 1 item
but if textedit object would ever need any recalling of stored text, this construction
would be too complicated, because one would have to convert stored text
to int representation to feed the message box etc etc
Not handy at all.
--------------------
Wow Rick.
I'm surprise to see that it could be done without third party external.
Impress I am.
I'm still trying to figure out how it is working.
Thanks for your patch.