-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTeclast_X98.ahk
105 lines (76 loc) · 2.16 KB
/
Teclast_X98.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
AUTOEXEC_Teclast_X98: ; Workaround for Autohotkey's ugly auto-exec feature. Must be first line.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
return ; End of auto-execute section.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;==============================================================
; For easy using of Teclast X98 tablet
;==============================================================
; For Teclast X98 bluetooth keyboard >>>
SC132:: AppsKey ; SC132: Browser_Home(open IE), useless, so make it AppsKey
RAlt::RCtrl
; So we're easier to press Ctrl+C, Ctrl+V
#SC132:: ; Win+IE,
mo_InitCountDown()
return
; For Teclast X98 bluetooth keyboard <<<
X98_corner_tooltip(tipstr, duration_msec:=2000, is_sync:=false)
{
CoordMode, ToolTip, Screen
tooltip, % tipstr, 0, 0
CoordMode, ToolTip, Window
if(is_sync) {
Sleep, % duration_msec
tooltip
}
else {
SetTimer, lbl_X98_corner_tooltip, % -duration_msec
}
return
lbl_X98_corner_tooltip:
tooltip
return
}
; [[ Use Volumn_down/Volumn_up creatively ]]
;
; Volumn_down vkAE , sc12E
; Volumn_up vkAF , sc130
X98_IsAcitveWindowVolumeAsArrow()
{
WinGet, Awinid, ID, A ; cache active window unique id
WinGetClass, class, ahk_id %Awinid%
WinGetTitle, title, ahk_id %Awinid%
if(class=="ConsoleWindowClass" ; CMD window
or class=="VirtualConsoleClass" ; ConEmu
or Evernote_IsMainFrameOrSingleActive())
{
return true
}
else
return false
}
#If not X98_IsAcitveWindowVolumeAsArrow()
; Press Volumn_down+Volumn_up to capture screen
vkAE & vkAF:: X98_PrintScreen()
X98_PrintScreen()
{
X98_corner_tooltip("AHK doing PrintScreen", 500, true)
Send {PrintScreen}
}
vkAE up:: Send {vkAEsc12E}
#If ; not X98_IsAcitveWindowVolumeAsArrow()
;---
#If X98_IsAcitveWindowVolumeAsArrow()
vkAE:: Send {Down}
vkAF:: Send {Up}
; F1:: MSGBOX, hhhhhhhhhh333333 ; // weird, F1 behaves incorrectly
#If ; X98_IsAcitveWindowVolumeAsArrow()
#IfWinActive ahk_class HyperSnap 7 Window Class
; Volumn_down close current image
vkAE:: HS7_close_image()
HS7_close_image()
{
X98_corner_tooltip("AHK close image (Ctrl+F4)", 1000)
Send ^{F4}
}
vkAE up:: return
#IfWinActive