Home   Archive   Permalink

Button to enter text into a VID area

Let's say I have a VID layout with an "area" for entering text, and a button, and I am typing away entering text into the area and I am in the middle of the area somewhere. Would there be a way to program the button so that if I clicked it, some canned text would be inserted into the area at the point where I was typing? This would be like the "soft keys" of a terminal emulation program where one function key could be programmed to "type" a whole string of characters for a situation where that whole string had to be entered many times.

posted by:   Steven White       10-May-2018/15:59:48-7:00

This is a little quirky, but kindof works:
view layout [
     txt: area 300x100
     btn "Append" [
         unless txt = system/view/focal-face [focus txt]
         insert system/view/caret "[Some Text]"
         show txt

posted by:   Chris       10-May-2018/16:41:30-7:00