forked from zixijian/tt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mouse.tt
34 lines (27 loc) · 1.17 KB
/
mouse.tt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#nop 鼠标事件点击带有下划线方向自动发送移动指令;
#class mouse open;
#nop 开启鼠标模式;
#config mouse on;
#nop 开启鼠标点击事件,点击即发送带有下划线标签的内容;
#event {PRESSED LINK MOUSE BUTTON ONE} {#send {%4}};
#nop 匹配方向替换为带有下划线标签的可点击链接;
#nop 此方案会替换所有匹配的方向,容易错误替换;
#nop #sub {\b{south|north|west|east|up|down|enter|out|southeast|southwest|northeast|northwest|southup|southdown|northup|northdown|westup|westdown|eastup|eastdown}\b} {<139>\e[4m%1\e[24m<099>};
#nop 此方案速度慢,导致输出延迟 1 秒;
#nop #action {^ 这里{唯一|明显}的{出口|方向}有%*。$} {
#local {dir_all} {%3};
#list dir_list create {southeast;southwest;northeast;northwest;southup;southdown;northup;northdown;westup;westdown;eastup;eastdown;north;south;west;east;enter;out;up;down;};
#foreach {$dir_list[]} {dir} {
#replace {dir_all} {\b$dir\b} {<139>\e[4m$dir\e[24m<099>};
};
#show { 这里%1的%2有$dir_all。};
#line gag;
};
#nop 最优方案;
#action {^ 这里{唯一|明显}的{出口|方向}{有|是}%*。$} {
#local {dir_all} {%4};
#replace {dir_all} {{\w+}} {<139>\e[4m&1\e[24m<099>};
#line ignore #show { 这里%1的%2%3$dir_all。};
#line gag;
}
#class mouse close;