Skip to content

Commit 0b12de2

Browse files
committed
keyboard layout
1 parent d79ccf9 commit 0b12de2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

q-dir_ahk.ahk

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
; 添加当前状态判断
55
; 解决问题:重命名文件夹和输入链接时,←和→被覆盖,导致移动光标出问题
66

7+
; 无法获取当前的键盘布局,是84键,104键盘,笔记本布局
8+
; 根据主机名来判断当前的键盘布局
9+
currentComputerName := A_ComputerName
10+
711
state := "Normal"
812

913
#If WinActive("ahk_exe Q-Dir_x64.exe") and (state = "Normal")
@@ -98,13 +102,21 @@ Return
98102
; Simulate an event that clicking on the search box of TIM.exe.
99103
#If WinActive("ahk_exe TIM.EXE")
100104
^F::
101-
ControlClick, x200 y80, ahk_exe TIM.EXE,, Left, 1
105+
if (currentComputerName = "P14") {
106+
ControlClick, x200 y80, ahk_exe TIM.EXE,, Left, 1
107+
} else {
108+
ControlClick, x123 y53, ahk_exe TIM.EXE,, Left, 1
109+
}
102110
Return
103111

104112
; Simulate an event that clicking on the search box of OneMessage.exe.
105113
#If WinActive("ahk_exe OneMessage.exe")
106114
^F::
107-
ControlClick, x200 y50, ahk_exe OneMessage.exe,, Left, 1
115+
if (currentComputerName = "P14") {
116+
ControlClick, x200 y50, ahk_exe OneMessage.exe,, Left, 1
117+
} else {
118+
ControlClick, x100 y45, ahk_exe OneMessage.exe,, Left, 1
119+
}
108120
Return
109121

110122
; Simulate an event that close the window

0 commit comments

Comments
 (0)