いま使っているAHKスクリプト(1本にまとめたもの)
code:user.ahk
SetBatchLines, -1
GroupAdd, kuntab, ahk_class MozillaWindowClass
GroupAdd, kuntab, ahk_class Chrome_WidgetWin_0
GroupAdd, kuntab, ahk_class Chrome_WidgetWin_1
GroupAdd, kuntab, ahk_class QWidget
GroupAdd, desktop, ahk_class Progman
GroupAdd, desktop, ahk_class WorkerW
GroupAdd, game, ahk_class UnityWndClass
GroupAdd, game, ahk_class Notepad
GroupAdd, game, ahk_exe Game.exe
SetCapsLockState, AlwaysOff
SetKeyDelay, 0
ShowMessage("AHK-funkcioj estas aktivaj")
Lingvo := "eo"
mousemode := 0
return
WinSet, AlwaysOnTop, toggle, A
return
;#IfWinActive ahk_class MozillaWindowClass || #IfWinActive ahk_class Chrome_WidgetWin_1 || #IfWinActive ahk_class Chrome_WidgetWin_0 ;
;Browser_Search::Esc
;NumpadHome::return
;NumpadUp::Volume_Down
;NumpadPgUp::Volume_Up
;Browser_Stop::!F4
;Browser_Refresh::Delete
;
;Browser_Home::Tab
;NumpadLeft::
; Send ^.
; Sleep, 250
; Send p
;Return
;NumpadClear::Return
;NumpadRight::Up
;NumpadAdd::[
;NumpadSub::]
;
;NumpadEnd::Backspace
;NumpadDown::Left
;NumpadPgDn::Down
;NumpadDiv::Right
;NumpadMult::Enter
;
;NumpadIns::z
;NumpadDel::x
;NumpadEnter::c
;Browser_Favorites::Space
;
;^NumpadIns::^z
;^NumpadDel::^x
;^NumpadEnter::^c
;^Browser_Favorites::^v
;
;
;#IfWinActive ahk_class PotPlayer64
;
;Browser_Search::Esc
;NumpadHome::Return
;NumpadUp::Volume_Down
;NumpadPgUp::Volume_Up
;Browser_Stop::!F4
;Browser_Refresh::Delete
;
;Browser_Home::Tab
;NumpadLeft::p
;NumpadClear::Return
;NumpadRight::Up
;NumpadAdd::[
;NumpadSub::]
;
;NumpadEnd::Backspace
;NumpadDown::Left
;NumpadPgDn::Down
;NumpadDiv::Right
;NumpadMult::Enter
;
;NumpadIns::z
;NumpadDel::x
;NumpadEnter::c
;Browser_Favorites::Space
;
;^NumpadIns::^z
;^NumpadDel::^x
;^NumpadEnter::^c
;^Browser_Favorites::^v
;
;#IfWinActive
;
;Browser_Search::Esc
;NumpadHome::return
;NumpadUp::Volume_Down
;NumpadPgUp::Volume_Up
;Browser_Stop::!F4
;Browser_Refresh::Delete
;
;Browser_Home::Tab
;NumpadLeft::p
;NumpadClear::Return
;NumpadRight::Up
;NumpadAdd::[
;NumpadSub::]
;
;NumpadEnd::Backspace
;NumpadDown::Left
;NumpadPgDn::Down
;NumpadDiv::Right
;NumpadMult::Enter
;
;NumpadIns::z
;NumpadDel::x
;NumpadEnter::c
;Browser_Favorites::Space
;
;^NumpadIns::^z
;^NumpadDel::^x
;^NumpadEnter::^c
;^Browser_Favorites::^v
;
;^NumpadSub::^y
Mousemode:
mousemode := 0
SetTimer, Mousemode, off
Return
^t::
if(mousemode == 0){
Send, ^t
Return
}
if(mousemode == 1){
Send, ^x
Return
}
Return
^w::
if(mousemode == 0){
Send, ^{LButton}
Return
}
if(mousemode == 1){
Send, ^c
Return
}
Return
^+t::
if(mousemode == 0){
Send, ^+t
Return
}
if(mousemode == 1){
Send, ^v
Return
}
Return
MButton::
;$mbutton:: ;
; while GetKeyState("mbutton", "P") ; While mouse button is being held:
; { } ; Don't do anything - After it has been released:
MouseGetPos,,,hwnd,ctrl,2 ;中ボタンをクリックした位置にあるウィンドウをアクティブ化
WinActivate, ahk_id %hwnd%
IfWinActive, ahk_exe Simplenote.exe ;SimplenoteもChromeのWindowクラスが出るので区別
{
;WinClose, ahk_id %hwnd%
;ShowMessage("Simplenote estis fermita")
return
}
IfWinActive, ahk_class TablacusExplorer ;マウスジェスチャ機能に任せる
{
Send, {MButton}
return
}
IfWinActive, ahk_group kuntab
{
Send,{LButton} ;ちゃんと選択しないとアクティブタブが閉じてしまうのでクリック
Send,^w ;タブ閉じショートカット ctrl+w を発行
ShowMessage("Langeto estis fermita")
return
}
IfWinActive, ahk_class Shell_TrayWnd ;タスクバーなら 7+ Taskbar Tweaker に任せるので中ボタンを送る
{
Send, {MButton}
return
}
IfWinActive, ahk_group desktop
{
Reload
return
}
WinGetTitle, Title, A
;WinClose, ahk_id %hwnd%
;ShowMessage(Title . " estis fermita")
return
q::
Thread, Interrupt, 220
KeyWait,q,T0.22
send, ,
flag = ,
return
+q::
Thread, Interrupt, 220
KeyWait,q,T0.22
send, <
flag = "+,"
return
w::
Thread, Interrupt, 220
KeyWait,w,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ŭ
;KeyWait,w
flag = w
Return
}
if(Lingvo == "ja")
{
Send, yw
;KeyWait,w
Return
}
}
Send,w
Return
+w::
Thread, Interrupt, 220
KeyWait,w,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, Ŭ
;KeyWait,w
flag = w
Return
}
if(Lingvo == "ja")
{
Send, yw
;KeyWait,w
Return
}
}
Send, W
Return
e::
Thread, Interrupt, 220
KeyWait,e,T0.22
Send, r
flag = r
Return
+e::
Thread, Interrupt, 220
KeyWait,e,T0.22
Send, R
flag = "+r"
Return
r::
Thread, Interrupt, 220
KeyWait,r,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, m
flag = m
;KeyWait,r
Return
}
if(Lingvo == "ja")
{
Send, M
;KeyWait,r
Return
}
}
Send, m
flag = m
Return
+r::
Thread, Interrupt, 220
KeyWait,r,T0.22
Send, M
flag = "+m"
Return
t::
Thread, Interrupt, 220
KeyWait,t,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ĥ
flag = h
;KeyWait,t
Return
}
if(Lingvo == "ja")
{
Send, f
;KeyWait,t
Return
}
}
flag = h
Send, h
Return
+t::
Thread, Interrupt, 220
KeyWait,t,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, Ĥ
flag = h
;KeyWait,t
Return
}
if(Lingvo == "ja")
{
Send, h
;KeyWait,t
Return
}
}
flag = "+h"
Send, H
Return
y::
Thread, Interrupt, 220
KeyWait,y,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, q
;KeyWait,y
Return
}
if(Lingvo == "ja")
{
Send, Q
;KeyWait,y
Return
}
}
if(Lingvo == "eo")
{
Send, q
;KeyWait,y
Return
}
if(Lingvo == "ja")
{
Send, uu
;KeyWait,y
Return
}
if(Lingvo == "zh")
{
Send, q
;KeyWait,y
Return
}
return
+y::
Thread, Interrupt, 220
KeyWait,q,T0.22
send,Q
return
u::
Thread, Interrupt, 220
KeyWait,u,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, f
flag = f
;KeyWait,u
Return
}
if(Lingvo == "ja")
{
Send, F
;KeyWait,u
Return
}
}
if(Lingvo == "eo")
{
Send, f
;KeyWait,u
Return
}
if(Lingvo == "ja")
{
Send, ai
;KeyWait,u
Return
}
if(Lingvo == "zh")
{
Send, f
;KeyWait,u
Return
}
flag = f
Return
+u::
Thread, Interrupt, 220
KeyWait,u,T0.22
If(ErrorLevel)
{
Send, F
;KeyWait,u
Return
}
Send, F
flag = "+f"
Return
i::
Thread, Interrupt, 220
KeyWait,i,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ĉ
;KeyWait,i
Return
}
if(Lingvo == "ja")
{
Send, C
;KeyWait,i
Return
}
}
if(Lingvo == "eo")
{
Send, c
;KeyWait,i
Return
}
if(Lingvo == "ja")
{
Send, ou
;KeyWait,i
Return
}
if(Lingvo == "zh")
{
Send, c
;KeyWait,y
Return
}
flag = c
Return
+i::
Thread, Interrupt, 220
KeyWait,i,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, Ĉ
;KeyWait,i
Return
}
if(Lingvo == "ja")
{
Send, C
;KeyWait,i
Return
}
}
Send, C
flag = "+c"
Return
o::
Thread, Interrupt, 220
KeyWait,o,T0.22
If(ErrorLevel)
{
if(Lingvo == "ja")
{
Send, >
;KeyWait,o
Return
}
If flag = l
{
Send, {Backspace}ḷ
flag = "l."
;KeyWait,o
Return
}
If flag = r
{
Send, {Backspace}ṛ
flag = "r."
;KeyWait,o
Return
}
If flag = n
{
Send, {Backspace}ṇ
;KeyWait,o
Return
}
If flag = t
{
Send, {Backspace}ṭ
;KeyWait,o
Return
}
If flag = d
{
Send, {Backspace}ḍ
;KeyWait,o
Return
}
If flag = s
{
Send, {Backspace}ṣ
;KeyWait,o
Return
}
If flag = h
{
Send, {Backspace}ḥ
;KeyWait,o
Return
}
If flag = m
{
Send, {Backspace}ṃ
;KeyWait,o
Return
}
;KeyWait,o
Return
}
if(Lingvo == "eo")
{
Send, .
;KeyWait,o
Return
}
if(Lingvo == "ja")
{
Send, .
;KeyWait,o
Return
}
if(Lingvo == "zh")
{
Send, .
;KeyWait,o
Return
}
Return
+o::
Thread, Interrupt, 220
KeyWait,o,T0.22
Send, >
flag = ">"
Return
p::
Thread, Interrupt, 220
KeyWait,p,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, x
;KeyWait,p
Return
}
if(Lingvo == "ja")
{
Send, X
;KeyWait,p
Return
}
}
if(Lingvo == "eo")
{
Send, x
;KeyWait,p
Return
}
if(Lingvo == "ja")
{
Send, ei
;KeyWait,p
Return
}
if(Lingvo == "zh")
{
Send, x
;KeyWait,p
Return
}
return
+p::
Thread, Interrupt, 220
KeyWait,p,T0.22
send,X
return
a::
Thread, Interrupt, 220
KeyWait,a,T0.22
if(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, n
;KeyWait,a
flag = n
Return
}
if(Lingvo == "ja")
{
Send, N
;KeyWait,a
Return
}
}
send, n
flag = n
Return
+a::
Thread, Interrupt, 220
KeyWait,a,T0.22
Send, N
flag = "+n"
Return
s::
Thread, Interrupt, 220
KeyWait,s,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, t
;KeyWait,s
flag = t
Return
}
if(Lingvo == "ja")
{
Send, T
;KeyWait,s
Return
}
}
Send, t
flag = t
Return
+s::
Thread, Interrupt, 220
KeyWait,s,T0.22
If(ErrorLevel)
{
Send, T
;KeyWait,s
Return
}
Send, T
flag = "+s"
Return
d::
Thread, Interrupt, 220
KeyWait,d,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ŝ
;KeyWait,d
flag = s
Return
}
if(Lingvo == "ja")
{
Send, S
;KeyWait,d
Return
}
}
flag = s
Send, s
Return
+d::
Thread, Interrupt, 220
KeyWait,d,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, Ŝ
;KeyWait,d
flag = s
Return
}
if(Lingvo == "ja")
{
Send, S
;KeyWait,d
Return
}
}
flag = "+s"
send, S
return
f::
Thread, Interrupt, 220
KeyWait,f,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, k
;KeyWait,f
Return
}
if(Lingvo == "ja")
{
Send, K
;KeyWait,f
Return
}
}
Send, k
Return
+f::
Thread, Interrupt, 220
KeyWait,f,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, K
;KeyWait,f
Return
}
if(Lingvo == "ja")
{
Send, K
;KeyWait,f
Return
}
}
Send, K
Return
g::
Thread, Interrupt, 220
KeyWait,g,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, y
;KeyWait,g
flag = y
Return
}
if(Lingvo == "ja")
{
Send, Y
;KeyWait,g
Return
}
}
Send, y
Return
+g::
Thread, Interrupt, 220
KeyWait,g,T0.22
If(ErrorLevel)
{
Send, Y
;KeyWait,g
Return
}
Send, Y
Return
h::
Thread, Interrupt, 220
KeyWait,h,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ŭ
;KeyWait,h
flag = u
Return
}
if(Lingvo == "ja")
{
Send, U
;KeyWait,h
Return
}
}
flag = u
Send, u
Return
+h::
Thread, Interrupt, 220
KeyWait,h,T0.22
If(ErrorLevel)
{
Send, Ŭ
;KeyWait,h
Return
}
Send, U
Return
j::
Thread, Interrupt, 220
KeyWait,j,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, a
;KeyWait,j
flag = a
Return
}
if(Lingvo == "ja")
{
Send, A
;KeyWait, j
Return
}
}
Send, a
flag = a
Return
+j::
Thread, Interrupt, 220
KeyWait,j,T0.22
If(ErrorLevel)
{
Send, A
;KeyWait,j
Return
}
Send, A
Return
k::
Thread, Interrupt, 220
KeyWait,k,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, o
flag = o
;KeyWait,k
Return
}
if(Lingvo == "ja")
{
Send, O
;KeyWait,k
Return
}
}
send,o
flag = o
return
+k::
Thread, Interrupt, 220
KeyWait,k,T0.22
send,O
flag = "+o"
return
l::
Thread, Interrupt, 220
KeyWait,l,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, i
flag = i
;KeyWait,l
Return
}
if(Lingvo == "ja")
{
Send, I
;KeyWait,l
Return
}
}
Send, i
flag = i
Return
+l::
Thread, Interrupt, 220
KeyWait,l,T0.22
Send, I
flag = "+i"
Return
`;::
Thread, Interrupt, 220
KeyWait,`;,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, e
flag = e
;KeyWait,`;
Return
}
if(Lingvo == "ja")
{
Send, e
flag = e
;KeyWait,`;
Return
}
}
send,e
flag = e
return
+`;::
Thread, Interrupt, 220
KeyWait,`;,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, E
flag = "+e"
;KeyWait,`;
Return
}
if(Lingvo == "ja")
{
Send, E
flag = "+e"
;KeyWait,`;
Return
}
}
send, E
flag = "+e"
return
z::
Thread, Interrupt, 220
KeyWait,z,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, p
;KeyWait,z
flag = p
Return
}
if(Lingvo == "ja")
{
Send, P
;KeyWait,z
Return
}
}
send,p
return
+z::
Thread, Interrupt, 220
KeyWait,z,T0.22
send,P
return
x::
Thread, Interrupt, 220
KeyWait,x,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, d
;KeyWait,x
flag = d
Return
}
if(Lingvo == "ja")
{
Send, D
;KeyWait,x
Return
}
}
send,d
return
+x::
Thread, Interrupt, 220
KeyWait,x,T0.22
send,D
return
c::
Thread, Interrupt, 220
KeyWait,c,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, z
;KeyWait,c
flag = z
Return
}
if(Lingvo == "ja")
{
Send, Z
;KeyWait, c
Return
}
}
Send, z
Return
+c::
Thread, Interrupt, 220
KeyWait,c,T0.22
If(ErrorLevel)
{
Send, Z
;KeyWait,c
Return
}
Send, Z
Return
v::
Thread, Interrupt, 220
KeyWait,v,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ĝ
;KeyWait,v
Return
}
if(Lingvo == "ja")
{
Send, g
;KeyWait,v
Return
}
flag = g
}
Send, g
flag = g
Return
+v::
Thread, Interrupt, 220
KeyWait,v,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, Ĝ
;KeyWait,v
Return
}
if(Lingvo == "ja")
{
Send, G
;KeyWait,v
Return
}
flag = g
}
Send, G
flag = g
Return
b::
Thread, Interrupt, 220
KeyWait,b,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, b
;KeyWait,b
flag = b
Return
}
if(Lingvo == "ja")
{
Send, v
;KeyWait,b
Return
}
}
send,b
return
+b::
Thread, Interrupt, 220
KeyWait,b,T0.22
send,B
return
n::
Thread, Interrupt, 220
KeyWait,n,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, v
;KeyWait, n
Return
}
if(Lingvo == "ja")
{
Send, V
;KeyWait, n
Return
}
}
if(Lingvo == "eo")
{
Send, v
;KeyWait,n
Return
}
if(Lingvo == "ja")
{
Send, unn
;KeyWait,n
Return
}
if(Lingvo == "zh")
{
Send, v
;KeyWait,n
Return
}
flag = v
Return
+n::
Thread, Interrupt, 220
KeyWait,n,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, V
;KeyWait,n
Return
}
if(Lingvo == "ja")
{
Send, V
;KeyWait,n
Return
}
}
Send, V
flag = "+v"
Return
m::
Thread, Interrupt, 220
KeyWait,m,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, ĵ
;KeyWait,m
Return
}
if(Lingvo == "ja")
{
Send, j
;KeyWait,m
Return
}
}
if(Lingvo == "eo")
{
Send, j
;KeyWait,m
Return
}
if(Lingvo == "ja")
{
Send, ann
;KeyWait, m
Return
}
if(Lingvo == "zh")
{
Send, j
;KeyWait,m
Return
}
flag = j
Return
+m::
Thread, Interrupt, 220
KeyWait,m,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, Ĵ
;KeyWait,m
Return
}
if(Lingvo == "ja")
{
Send, J
;KeyWait,m
Return
}
}
Send, J
flag = "+j"
Return
,::
Thread, Interrupt, 220
KeyWait,`,,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, l
;KeyWait,`,
Return
}
if(Lingvo == "ja")
{
Send, L
;KeyWait,`,
Return
}
}
if(Lingvo == "eo")
{
Send, l
;KeyWait,`,
Return
}
if(Lingvo == "ja")
{
Send, onn
;KeyWait, `,
Return
}
if(Lingvo == "zh")
{
Send, l
;KeyWait, `,
Return
}
flag = l
return
+,::
Thread, Interrupt, 220
KeyWait,`,,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, L
;KeyWait,`,
Return
}
if(Lingvo == "ja")
{
Send, L
;KeyWait,`,
Return
}
}
send, L
flag = "+l"
return
.::
Thread, Interrupt, 220
KeyWait,.,T0.22
if(Lingvo == "eo")
{
Send, `;
;KeyWait, .
Return
}
if(Lingvo == "ja")
{
Send, inn
;KeyWait, .
Return
}
if(Lingvo == "zh")
{
Send, `;
;KeyWait, `,
Return
}
Return
+.::
Thread, Interrupt, 220
KeyWait,.,T0.22
Send, :
Return
/::
Thread, Interrupt, 220
KeyWait,/,T0.22
If(ErrorLevel)
{
if(Lingvo == "eo")
{
Send, /
;KeyWait,/
Return
}
if(Lingvo == "ja")
{
Send, ?
;KeyWait, /
Return
}
}
if(Lingvo == "eo")
{
Send, /
;KeyWait,/
Return
}
if(Lingvo == "ja")
{
Send, enn
;KeyWait, /
Return
}
if(Lingvo == "zh")
{
Send, /
;KeyWait, `,
Return
}
return
;*q::,
;*w::w
;*e::r
;*r::m
;*t::h
;*y::q
;*u::f
;*i::c
;*o::.
;*p::x
;*a::n
;*s::t
;*d::s
;*f::k
;*g::y
;*h::u
;*j::a
;*k::o
;*l::i
;*;::e
;*z::p
;*x::d
;*c::z
;*v::g
;*b::b
;*n::n
;*m::j
;*,::l
;*.::`;
;*/::/
1::
Thread, Interrupt, 220
KeyWait,1,T0.22
If(ErrorLevel)
{
If flag = a
{
Send, {Backspace}ā
flag =
;KeyWait,1
Return
}
If flag = e
{
Send, {Backspace}ē
flag =
;KeyWait,1
Return
}
If flag = i
{
Send, {Backspace}ī
flag =
;KeyWait,1
Return
}
If flag = o
{
Send, {Backspace}ō
flag =
;KeyWait,1
Return
}
If flag = u
{
Send, {Backspace}ū
flag =
;KeyWait,1
Return
}
If flag = ü
{
Send, {Backspace}ǖ
flag =
;KeyWait,1
Return
}
If flag = "+a"
{
Send, {Backspace}Ā
flag =
;KeyWait,1
Return
}
If flag = "+e"
{
Send, {Backspace}Ē
flag =
;KeyWait,1
Return
}
If flag = "+i"
{
Send, {Backspace}Ī
flag =
;KeyWait,1
Return
}
If flag = "+o"
{
Send, {Backspace}Ō
flag =
;KeyWait,1
Return
}
If flag = "+u"
{
Send, {Backspace}Ū
flag =
;KeyWait,1
Return
}
If flag = "+ü"
{
Send, {Backspace}Ǖ
flag =
;KeyWait,1
Return
}
If flag = l
{
Send, {Backspace}ḹ
;KeyWait,1
Return
}
If flag = "l."
{
Send, {Backspace}ḹ
;KeyWait,1
Return
}
If flag = r
{
Send, {Backspace}ṝ
;KeyWait,1
Return
}
If flag = "r."
{
Send, {Backspace}ṝ
;KeyWait,1
Return
}
KeyWait,1
Return
}
Send,1
Return
2::
Thread, Interrupt, 220
KeyWait,2,T0.22
If(ErrorLevel)
{
If flag = a
{
Send, {Backspace}á
flag =
KeyWait,2
Return
}
If flag = e
{
Send, {Backspace}é
flag =
KeyWait,2
Return
}
If flag = i
{
Send, {Backspace}í
flag =
KeyWait,2
Return
}
If flag = o
{
Send, {Backspace}ó
flag =
KeyWait,2
Return
}
If flag = u
{
Send, {Backspace}ú
flag =
KeyWait,2
Return
}
If flag = ü
{
Send, {Backspace}ǘ
flag =
KeyWait,2
Return
}
If flag = s
{
Send, {Backspace}ś
KeyWait,2
Return
}
If flag = "+a"
{
Send, {Backspace}Á
flag =
KeyWait,2
Return
}
If flag = "+e"
{
Send, {Backspace}É
flag =
KeyWait,2
Return
}
If flag = "+i"
{
Send, {Backspace}Í
flag =
KeyWait,2
Return
}
If flag = "+o"
{
Send, {Backspace}Ó
flag =
KeyWait,2
Return
}
If flag = "+u"
{
Send, {Backspace}Ú
flag =
KeyWait,2
Return
}
If flag = "+ü"
{
Send, {Backspace}Ǘ
flag =
KeyWait,2
Return
}
If flag = "+s"
{
Send, {Backspace}Ś
KeyWait,2
Return
}
Return
}
Send,2
Return
3::
Thread, Interrupt, 220
KeyWait,3,T0.22
If(ErrorLevel)
{
If flag = a
{
Send, {Backspace}ǎ
flag =
KeyWait,3
Return
}
If flag = e
{
Send, {Backspace}ě
flag =
KeyWait,3
Return
}
If flag = i
{
Send, {Backspace}ǐ
flag =
KeyWait,3
Return
}
If flag = o
{
Send, {Backspace}ǒ
flag =
KeyWait,3
Return
}
If flag = u
{
Send, {Backspace}ǔ
flag =
KeyWait,3
Return
}
If flag = ü
{
Send, {Backspace}ǚ
flag =
KeyWait,3
Return
}
If flag = "+a"
{
Send, {Backspace}Ǎ
flag =
KeyWait,3
Return
}
If flag = "+e"
{
Send, {Backspace}Ě
flag =
KeyWait,3
Return
}
If flag = "+i"
{
Send, {Backspace}Ǐ
flag =
KeyWait,3
Return
}
If flag = "+o"
{
Send, {Backspace}Ǒ
flag =
KeyWait,3
Return
}
If flag = "+u"
{
Send, {Backspace}Ǔ
flag =
KeyWait,3
Return
}
If flag = "+ü"
{
Send, {Backspace}Ǚ
flag =
KeyWait,3
Return
}
Return
}
Send,3
Return
4::
Thread, Interrupt, 220
KeyWait,4,T0.22
If(ErrorLevel)
{
If flag = a
{
Send, {Backspace}à
flag =
KeyWait,4
Return
}
If flag = e
{
Send, {Backspace}è
flag =
KeyWait,4
Return
}
If flag = i
{
Send, {Backspace}ì
flag =
KeyWait,4
Return
}
If flag = o
{
Send, {Backspace}ò
flag =
KeyWait,4
Return
}
If flag = u
{
Send, {Backspace}ù
flag =
KeyWait,4
Return
}
If flag = ü
{
Send, {Backspace}ǜ
flag =
KeyWait,4
Return
}
If flag = "+a"
{
Send, {Backspace}À
flag =
KeyWait,4
Return
}
If flag = "+e"
{
Send, {Backspace}È
flag =
KeyWait,4
Return
}
If flag = "+i"
{
Send, {Backspace}Ì
flag =
KeyWait,4
Return
}
If flag = "+o"
{
Send, {Backspace}Ò
flag =
KeyWait,4
Return
}
If flag = "+u"
{
Send, {Backspace}Ù
flag =
KeyWait,4
Return
}
If flag = "+ü"
{
Send, {Backspace}Ǜ
flag =
KeyWait,4
Return
}
Return
}
Send,4
Return
5::
Thread, Interrupt, 220
KeyWait,5,T0.22
If(ErrorLevel)
{
If flag = a
{
Send, {Backspace}ä
flag =
KeyWait,5
Return
}
If flag = e
{
Send, {Backspace}ë
flag =
KeyWait,5
Return
}
If flag = i
{
Send, {Backspace}ï
flag =
KeyWait,5
Return
}
If flag = o
{
Send, {Backspace}ö
flag =
KeyWait,5
Return
}
If flag = u
{
Send, {Backspace}ü
flag = ü
KeyWait,5
Return
}
If flag = "+a"
{
Send, {Backspace}Ä
flag =
KeyWait,5
Return
}
If flag = "+e"
{
Send, {Backspace}Ë
flag =
KeyWait,5
Return
}
If flag = "+i"
{
Send, {Backspace}Ï
flag =
KeyWait,5
Return
}
If flag = "+o"
{
Send, {Backspace}Ö
flag =
KeyWait,5
Return
}
If flag = "+u"
{
Send, {Backspace}Ü
flag = "+ü"
KeyWait,5
Return
}
Return
}
Send,5
Return
6::
Thread, Interrupt, 220
KeyWait,6,T0.22
If(ErrorLevel)
{
If flag = a
{
Send, {Backspace}â
flag =
KeyWait,6
Return
}
If flag = e
{
Send, {Backspace}ê
flag =
KeyWait,6
Return
}
If flag = i
{
Send, {Backspace}î
flag =
KeyWait,6
Return
}
If flag = o
{
Send, {Backspace}ô
flag =
KeyWait,6
Return
}
If flag = u
{
Send, {Backspace}û
flag =
KeyWait,6
Return
}
If flag = "+a"
{
Send, {Backspace}Â
flag =
KeyWait,6
Return
}
If flag = "+e"
{
Send, {Backspace}Ê
flag =
KeyWait,6
Return
}
If flag = "+i"
{
Send, {Backspace}Î
flag =
KeyWait,6
Return
}
If flag = "+o"
{
Send, {Backspace}Ô
flag =
KeyWait,6
Return
}
If flag = "+u"
{
Send, {Backspace}Û
flag =
KeyWait,6
Return
}
Return
}
Send,6
Return
7::
Thread, Interrupt, 220
KeyWait,7,T0.22
If(ErrorLevel)
{
If flag = n
{
Send, {Backspace}ñ
flag =
KeyWait,7
Return
}
Return
}
Send,7
Return
9::
Thread, Interrupt, 220
KeyWait,9,T0.22
If(ErrorLevel)
{
If flag = n
{
Send, {Backspace}ṅ
flag =
KeyWait,9
Return
}
Return
}
Send,9
Return
;Capslock::
; Send, !+2
; IME_SET(1)
; IME_SET(0)
; Send, +!3
; Return
;
;Ctrlを単押しでアルファベット入力に
$LCtrl::
mousemode := 1
SetTimer, Mousemode, 50
if (isCtrlRepeat == true) ;キーリピートしているかどうか
{
if (A_PriorKey != "LControl") ;Ctrl長押し中の他キー押し下げを検出
{
IsCtrlBroken := true
Return
}
else Return
}
Send {Blind}{CtrlDown} ;Ctrlを押し下げ
isCtrlRepeat := true
Return
;Ctrlを離したときに判定
$LCtrl up::
isCtrlRepeat := false
if (IsCtrlBroken == false){
if (A_PriorKey == "LControl"){ ;LCtrl単押しを検出
Send {Blind}{CtrlUp}
Send, ^,
Send, {LAlt Down}{LShift}{LAlt Up}
Send, {LAlt Down}{LShift}{LAlt Up}
Lingvo := "eo"
ShowMessage("Esperanta reĝimo")
Return
}
}
; Sleep 110
IsCtrlBroken := false
Send, {Blind}{CtrlUp} ;Ctrlをリリース
Return
[::
Thread, Interrupt, 220
KeyWait,[,T0.22
If(ErrorLevel)
{
Send, ^,
Send, !+2 ;日本語に復帰
Lingvo := "ja"
ShowMessage("日本語入力")
;KeyWait,[
Return
}
Send, [
Return
]::
Thread, Interrupt, 220
KeyWait,],T0.22
If(ErrorLevel)
{
Send, ^,
Lingvo := "zh"
ShowMessage("中文输入法")
;KeyWait,]
Return
}
Send, ]
Return
'::
Thread, Interrupt, 220
KeyWait,',T0.22
If(ErrorLevel)
{
Send, ^,
Send, !+2
Send, ^/
lingvo = eo
;KeyWait,'
Return
}
if(Lingvo == "eo")
{
Send, '
;KeyWait, '
Return
}
if(Lingvo == "ja")
{
Send, -
;KeyWait, '
Return
}
return
Enter::
Thread, Interrupt, 220
KeyWait,Enter,T0.22
send,{Enter}
return
8::
Thread, Interrupt, 220
KeyWait,8,T0.22
send, 8
return
0::
Thread, Interrupt, 220
KeyWait,0,T0.22
send, 0
return
-::
Thread, Interrupt, 220
KeyWait,-,T0.22
send,-
return
Up::
Thread, Interrupt, 220
KeyWait,0,T0.22
send, {Up}
return
Down::
Thread, Interrupt, 220
KeyWait,0,T0.22
send, {Down}
return
Left::
Thread, Interrupt, 220
KeyWait,0,T0.22
send, {Left}
return
Right::
Thread, Interrupt, 220
KeyWait,0,T0.22
send, {Right}
return
ShowMessage(message) {
; Progress, B ZH0 FS20 WS700 CTEEEEEE CW333333, %message%, , , Segoe UI
Progress, B ZH0 FS20 WS700 CTAAFFEE CW112233 WM500, %message%, , progtip, 字体管家乌克丽丽
WinSet, Transparent, 150, progtip
Progress, 2: B X2400 ZH0 FS20 WS700 CTAAFFEE CW112233 WM500, %message%, , progtip, 字体管家乌克丽丽
WinSet, Transparent, 150, progtip
SetTimer, HideMessage, 1000
SetTimer, HideMessage, 1000
}
HideMessage() {
Progress, off
Progress, 2: off
SetTimer, HideMessage, off
}
IsWindowAlwaysOnTop(windowTitle) {
WinGet, windowStyle, ExStyle, %windowTitle%
return (windowStyle & 0x8) ; 0x8 is WS_EX_TOPMOST.
}
`::
Thread, Interrupt, 220
KeyWait,,T0.22
If(ErrorLevel)
{
Send,
KeyWait,
Return
}
Send, {Backspace}
ShowMessage("Backspacen(premu por `)")
Return
+::+
\::
Thread, Interrupt, 220
KeyWait,\,T0.22
If(ErrorLevel)
{
Send, \
KeyWait, \
Return
}
Send, {Backspace}
ShowMessage("Backspace`n(premu \ por \)")
Return
Space::
Thread, Interrupt, 220
KeyWait, Space, T0.22
Send, {Space}
Return
;Spaceを押したとき
;$*Space::
; if (isSpaceRepeat == true) ;キーリピートしているかどうか
; {
; if (A_PriorKey != "Space") ;Space長押し中の他キー押し下げを検出
; {
; KeyWait, Space
; Send {Blind}{ShiftUp} ;Shiftをリリース
; isSpaceRepeat := false
; Return
; }
; else Return
; }
;
; Send {Blind}{ShiftDown} ;Shiftを押し下げ
; isSpaceRepeat := true
;Return
;
;
;Spaceを離したとき
;$*Space up::
; Send {Blind}{ShiftUp} ;Shiftをリリース
; isSpaceRepeat := false
; if (A_PriorKey == "Space"){ ;Space単押しを検出
; Send {Blind}{Space} ;Spaceを入力
; }
;Return