forked from maestrith/AHK-Studio
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Class PluginClass.ahk
60 lines (59 loc) · 1017 Bytes
/
Class PluginClass.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Class PluginClass{
__New(){
return this
}
update(filename,text){
update({file:filename,text:text})
}
Style(){
return ea:=settings.ea(settings.ssn("//fonts/font[@style='5']")),ea.color:=RGB(ea.color),ea.Background:=RGB(ea.Background)
}
TrayTip(info){
TrayTip,AHK Studio,%info%,2
}
Publish(info:=0){
return Publish(info)
}
Hotkey(win:=1,key:="",label:="",on:=1){
if !(win,key,label)
return m("Unable to set hotkey")
Hotkey,IfWinActive,% hwnd([win])
Hotkey,%key%,%label%,% _:=on?"On":"Off"
}
save(){
save()
}
sc(){
return csc()
}
hwnd(win:=1){
return hwnd(win)
}
get(name){
return _:=%name%
}
m(info*){
m(info*)
}
call(info*){
if IsFunc(info.1){
func:=info.1
info.Remove(1)
return %func%(info*)
}else if (IsLabel(info.1)){
SetTimer,% info.1,-100
}
}
activate(){
WinActivate,% hwnd([1])
}
open(info){
tv(open(info))
}
GuiControl(info*){
GuiControl,% info.1,% info.2,% info.3
}
ssn(node,path){
return node.SelectSingleNode(path)
}
}