I defined it as a function WAI
Then called in a subfunction of the AutoText item,
But it will always execute
Also, I didn't find the event settings on the item by mouse Right-click
It would be much better if the operation on WAI was defined as an argument in the DynamicLV function, e.g: DynamicLV(_s 1 1) ;;set 1 can locate by right-clicking
Autotext autotext8
Trigger $t
Function WAI
Then called in a subfunction of the AutoText item,
But it will always execute
Also, I didn't find the event settings on the item by mouse Right-click
It would be much better if the operation on WAI was defined as an argument in the DynamicLV function, e.g: DynamicLV(_s 1 1) ;;set 1 can locate by right-clicking
Autotext autotext8
Trigger $t
/b/i/c/m
te :sub.Sub1 ;;1 test DynamicLV
#sub Sub1 m
WAI "a"
_s=
;A I'm in the line 1
;B I'm in the line 2
;C I'm in the line 3
_i=DynamicLV(_s)
sel _i+1
,case 1
,mes "I'm in the line 1"
,case 2
,mes "I'm in the line 2"
,case 3
,mes "I'm in the line 3"
,case 4
,mes "I'm in the line 4"
,case 5
,mes "I'm in the line 5"
,case 6
,mes "I'm in the line 6"
Function WAI
function $text ;;Where Am I
;get caller's QM item id and position in source code
int iid pos=Statement(1 0 0 iid)
;go to source code now
mac+ iid
int h=GetQmCodeEditor
act h
SendMessage h SCI.SCI_GOTOPOS pos 0
;Normally you would add iid/pos to an array and go to source code later on user request etc.
;Create a class. Let Add be a function of that class. Let the array be a class field (variable).