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
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; 자동 생성
; 시작 메시지박스 1초간 띄우기
MsgBox, 0, , Onenote_Script START, 1
;무한 루프 (실행 유지)
LOOP
{
; F2를 눌렀을 때 (Down Event)
if(GetKeyState("F2", P))
{
; 지우개 클릭 후 커서 제자리로
MouseGetPos, xpos, ypos
MouseClick, left, 250, 150
MouseMove, xpos, ypos
; Down Event 이후에 Up이 입력됐을 경우, 다시 pen을 클릭하여 원상태 복구
LOOP
{
if(!GetKeyState("F2", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 300, 150
MouseMove, xpos, ypos
break
}
}
}
if(GetKeyState("F3", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 350, 150
MouseMove, xpos, ypos
LOOP
{
if(!GetKeyState("F3", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 300, 150
MouseMove, xpos, ypos
break
}
}
}
if(GetKeyState("F4", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 410, 150
MouseMove, xpos, ypos
LOOP
{
if(!GetKeyState("F4", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 300, 150
MouseMove, xpos, ypos
break
}
}
}
if(GetKeyState("F5", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 470, 150
MouseMove, xpos, ypos
LOOP
{
if(!GetKeyState("F5", P))
{
MouseGetPos, xpos, ypos
MouseClick, left, 300, 150
MouseMove, xpos, ypos
break
}
}
}
; Ctrl + "-" 입력 시, 메시지박스 띄운 후 종료
if(GetKeyState("-", P) && GetKeyState("Ctrl", P))
{
MsgBox, 0, , Onenote_Script END, 1
break
}
}
|