Posts: 726
Threads: 99
Joined: Mar 2018
04-29-2019, 11:16 AM
(This post was last modified: 04-29-2019, 11:22 AM by win.)
Hello, I have defined an Autotext.
Pasted text, I need to always be at the begin of the line, then keep selected,
How to keep selected? is this possible? Thanks in advance
I use code (
'SH)to delete the begin characters in a line. Is there a better way?
Autotext
test
Trigger
$t
/b/i/c/m
te :sub.Sub1 ;;test
#sub Sub1 m
'SH ;;Delete characters in line
_s=
F
;line1
;line2
;line3
;line4
;line5
;line6
paste(_s)
;code: Selected pasted characters
Posts: 726
Threads: 99
Joined: Mar 2018
04-29-2019, 09:13 PM
(This post was last modified: 04-29-2019, 09:47 PM by win.)
I solved this problem, is there a better way?
Can be achieved with pointer?
In the case of automatic line break, my method will have problems
Autotext
test
Trigger
$t
/b/i/c/m
te :sub.Sub1 ;;test
#sub Sub1 m
'SH ;;Delete characters in line
_s=
F
;QMITEM qmac; int imac
;ARRAY(str) amac
;rep
;,imac=qmitem(-imac 2 &qmac 1)
;,if(imac=0) break
;,if qmac.itype=0
;,,amac[]=qmac.name
paste(_s)
;code: Selected pasted characters
_i=numlines(_s)
'SH
key S{U(#_i-1)}
'SH