Skip to content

Commit

Permalink
v1.35 增加参数 monitorProc 表示监控的进程名,默认匹配所有进程
Browse files Browse the repository at this point in the history
  • Loading branch information
pattazl committed Dec 22, 2024
1 parent be81a83 commit dd61ad7
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 11 deletions.
3 changes: 3 additions & 0 deletions build/release/httpdist/dist/showKeyBoard.desc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ showMouseEvent = 1
; 是否显示和记录鼠标事件, 00高位表示显示,低位表示记录,所以1仅记录,2是显示不记录,3是显示和记录,
recordMouseMove = 0
; 是否记录鼠标移动距离
; 是否记录鼠标移动距离
needShowKey = 1
; 是否显示按键
needRecordKey = 1
Expand All @@ -18,6 +19,8 @@ serverPort = 9900
; 后端服务端口号
activeWindowProc = ""
; 按键显示仅仅针对活跃窗口,正则匹配
monitorProc = ""
; 监控的进程名,默认匹配所有进程
hotkey4Show = "^!+s"
; 按键显示开关快捷键
autoSave2Db = 180
Expand Down
2 changes: 1 addition & 1 deletion build/showKeyBoard(node).nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

; 安装程序初始定义常量
!define PRODUCT_NAME $(ToolLang)
!define PRODUCT_VERSION "v1.34"
!define PRODUCT_VERSION "v1.35"
!define /date DATESTR "%y%m%d"
!define ExeName "showKeyBoard.exe"
!define PRODUCT_PUBLISHER "Austin.Young"
Expand Down
2 changes: 1 addition & 1 deletion build/showKeyBoard.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

; 安装程序初始定义常量
!define PRODUCT_NAME $(ToolLang)
!define PRODUCT_VERSION "v1.34"
!define PRODUCT_VERSION "v1.35"
!define /date DATESTR "%y%m%d"
!define ExeName "showKeyBoard.exe"
!define PRODUCT_PUBLISHER "Austin.Young"
Expand Down
8 changes: 6 additions & 2 deletions common.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ if serverPort = serverPortDect{
activeWindowProc :=DescRead("common","activeWindowProc","" )
; 按键显示仅仅针对活跃窗口,正则匹配

monitorProc :=DescRead("common","monitorProc", "" )
; 监控的进程名,默认匹配所有进程

showHttpDebug :=DescRead("common","showHttpDebug","0" )
; 是否显示http调试框

Expand All @@ -83,10 +86,11 @@ hideInWinPwd :=DescRead("common","hideInWinPwd", "0" )
statProcInfo :=DescRead("common","statProcInfo", "1" )
; 是否发送按键对应的进程信息,可用于统计不同进程下的按键数
defaultLang :=DescRead("common","defaultLang", "zh-CN" )
; 默认语言

; 后端服务执行程序文件名
serverExecName :=DescRead("common","serverExecName", "node.exe" )
; 默认语言
; 后端服务执行程序文件名

; 配置参数
guiWidth :=DescRead("dialog","guiWidth", 300 ) ; 宽度
guiHeigth :=DescRead("dialog","guiHeigth", 0 ) ;高度 0 为自动高度
Expand Down
19 changes: 18 additions & 1 deletion dialog.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,26 @@ EditIsPWD(){
}
return isPASS
}
; 将数据放到数组中
; 将按键数据放到数组中
PushTxt(txt,isMouse:=False)
{
; 只监控指定进程
if monitorProc != ''{
; 获取活跃窗口 WinGetProcessName
activeWnd := WinExist("A")
if(activeWnd !=0 ){
procName := WinGetProcessName(activeWnd)
FoundPos := RegExMatch(procName, monitorProc )
; 没有找到匹配则退出,不记录相关数据
if FoundPos = 0{
return
}
}else{
; 没有获取进程信息,也不记录
return
}
; 进程匹配则继续
}
; 界面显示内容
if( needShowKey = 1 && (!isMouse || (isMouse && GetBitState(showMouseEvent,2)=1 ))){
maskTxt := txt
Expand Down
6 changes: 3 additions & 3 deletions showKeyBoard.ahk
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
;编译信息
;@Ahk2Exe-SetName ShowKeyBoard
;@Ahk2Exe-SetDescription Show and Analyse Mouse/KeyBoard
;@Ahk2Exe-SetProductVersion 1.34.0.0
;@Ahk2Exe-SetFileVersion 1.34.0.0
;@Ahk2Exe-SetProductVersion 1.35.0.0
;@Ahk2Exe-SetFileVersion 1.35.0.0
;@Ahk2Exe-SetCopyright Austing.Young (2023 - )
;@Ahk2Exe-SetMainIcon res\keyboard.ico
;@Ahk2Exe-ExeName build/release/ShowKeyBoard.exe
#Requires AutoHotkey v2
#SingleInstance Ignore
global APPName:="ShowKeyBoard", ver:="1.34"
global APPName:="ShowKeyBoard", ver:="1.35"
#include common.ahk
#include langVars.ahk
#Include events.ahk
Expand Down
6 changes: 6 additions & 0 deletions ui-helper/src/components/setting/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
<n-input-number v-model:value="allConfig.common.serverPort" :min="80" :max="65535" />
</template>
</n-list-item>
<n-list-item>{{ contentText.intro179}}
<template #suffix>
<n-input v-model:value="allConfig.common.monitorProc" type="text"
:placeholder="contentText.intro13" />
</template>
</n-list-item>
<n-list-item>{{ contentText.intro12 }}
<template #suffix>
<n-input v-model:value="allConfig.common.activeWindowProc" type="text"
Expand Down
2 changes: 2 additions & 0 deletions ui-helper/src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export default {
intro176: '应用全路径显示的Y位置',
intro177: '客户端通讯异常,请重启客户端或重启系统',
intro178: '后台通讯中...',
intro179: '仅针对指定进程记录按键,注:显示是基于按键的',

},
'en-US': {
Expand Down Expand Up @@ -416,5 +417,6 @@ export default {
intro176: 'Tooltip of App path Y position',
intro177: 'Communication of Client error, please restart the client or system',
intro178: 'Communicate with backend...',
intro179: 'Record for defined active process , note: display is based on record',
}
};
1 change: 1 addition & 0 deletions ui-helper/src/mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
ctrlState:'intro9',
serverPort:'intro11',
activeWindowProc:'intro12',
monitorProc:'intro179',
hotkey4Show:'intro14',
guiMonitorNum:'intro44',
guiWidth:'intro18',
Expand Down
6 changes: 3 additions & 3 deletions ui-helper/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* @version 配置显示在登录页面的前端版本,格式为 v.主版本号.次版本号.日期.小版本序号 v1.0.190827.1
*/
// 对于发布版 YYMMDD 和 verNo 会在Webpack中自动替换为真实的日期和版本序号,如下格式不能随便改,参考vue.config.js的代码
const replaceYYMMDD = '240216';
const replaceVerNo = '0';
const mainVersion = ' v1.31';
const replaceYYMMDD = '241222';
const replaceVerNo = '1';
const mainVersion = ' v1.35';
const strVersion = mainVersion+'.'+replaceYYMMDD+'.'+replaceVerNo; // 可以支持旧版浏览器
//export default strVersion
export {strVersion};

0 comments on commit dd61ad7

Please sign in to comment.