Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input routine
#8
(05-20-2024, 09:00 PM)grymmjack Wrote: @SMcNeill this is a great share! ExtendedInput! <3

Could you add cursor movement with Home, End, CTRL+arrows, and previous input history recall if supplied (up/down arrow), and insert mode? Big Grin LOL!

You rock!

Doesn't it do all those already?  Home goes to the start of your input.  End to the end.  Arrows keys left/right into the middle of the input.

Code: (Select All)
                Case 18176 'Home
                    CP = 0
                Case 20224 'End
                    CP = Len(in$)
                Case 21248 'Delete
                    oldin$ = in$
                    in$ = Left$(in$, CP) + Mid$(in$, CP + 2)
                Case 19200 'Left
                    CP = CP - 1
                    If CP < 0 Then CP = 0
                Case 19712 'Right
                    CP = CP + 1
                    If CP > Len(in$) Then CP = Len(in$)
CP is Cursor Position, so 0 is to the left of the text, LEN(in$) is the right of the text, and any value between those numbers is inside the input text.  Wink

There's no Insert mode (overwrite), but you're free to expand and alter what's here as you wish for your own personal needs.  Smile
Reply


Messages In This Thread
Input routine - by dano - 05-20-2024, 05:10 PM
RE: Input routine - by bplus - 05-20-2024, 05:54 PM
RE: Input routine - by dano - 05-20-2024, 06:51 PM
RE: Input routine - by SMcNeill - 05-20-2024, 07:15 PM
RE: Input routine - by grymmjack - 05-20-2024, 08:57 PM
RE: Input routine - by SMcNeill - 05-20-2024, 09:35 PM
RE: Input routine - by grymmjack - 05-20-2024, 09:00 PM
RE: Input routine - by SMcNeill - 05-20-2024, 09:41 PM
RE: Input routine - by grymmjack - 05-21-2024, 03:47 AM
RE: Input routine - by grymmjack - 05-21-2024, 03:50 AM



Users browsing this thread: 1 Guest(s)