-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathSetIcon.ahk
43 lines (38 loc) · 884 Bytes
/
SetIcon.ahk
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
35
36
37
38
39
40
41
42
43
/*
SetIcon()
Lintalist v1.1
Date: 20170205
Return: Icon for listview
Icon1: Default text snippet
Icon2: Default script snippet
Icon3: HTML/MD text snippet
Icon4: RTF text snippet
Icon5: Image text snippet
Icon6: HTML/MD text snippet with script
Icon7: RTF text snippet with script
Icon8: Image text snippet with script
*/
SetIcon(text,script)
{
If (script = "")
{
IconVal := "Icon1"
If RegExMatch(text[1] text[2],"i)\[\[html|md\]\]")
IconVal:="Icon3"
If RegExMatch(text[1] text[2],"i)\[\[rtf\=")
IconVal:="Icon4"
If RegExMatch(text[1] text[2],"i)\[\[image\=")
IconVal:="Icon5"
}
else
{
IconVal := "Icon2"
If RegExMatch(text[1] text[2],"i)\[\[html|md\]\]")
IconVal:="Icon6"
If RegExMatch(text[1] text[2],"i)\[\[rtf\=")
IconVal:="Icon7"
If RegExMatch(text[1] text[2],"i)\[\[image\=")
IconVal:="Icon8"
}
Return IconVal
}