Skip to content

Commit

Permalink
v2.2.0-hotfit
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeeee committed Nov 19, 2023
1 parent a020e30 commit c2b20dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
## 使用方法

### 1. 安装 AHK
脚本支持 [Autohotkey V2](https://www.autohotkey.com/download/ahk-v2.exe)
脚本支持 [Autohotkey V2](https://www.autohotkey.com/)[下载地址](https://www.autohotkey.com/download/ahk-v2.exe)

### 2. CATIA 设置 P2版本
CATIA 配置: 工具 - 选项 - 常规 - 用户界面样式(P2)

### 3. 双击 UCLC.ahk 启动脚本

下载[UCLC](https://github.com/zedeeee/UCLC/releases/latest),解压后运行UCLC.ahk


## 用户自定义
用户自定义设置位于`./config/`目录下
Expand Down
15 changes: 4 additions & 11 deletions UCLC.ahk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Requires AutoHotKey v2.0
SetTitleMatchMode "RegEx"

#Include <CATAlias>
#Include ./Lib/CATAlias.ahk
#Include ./Lib/stdio.ahk
#Include ./Lib/window.ahk
#Include ./Lib/string.ahk
Expand All @@ -11,7 +11,6 @@ SetTitleMatchMode "RegEx"
TraySetIcon("./icon/color-icon64.png")

global config_ini_path := A_ScriptDir "/config/config.ini"
; global alias_ini_path := RTrim(config_ini_path, "config.ini") IniRead(config_ini_path, "配置文件", "alias_ini")
global alias_ini_path := INI_GET_SUBCONFIG_PATH("用户别名")
global iDelay := IniRead(config_ini_path, "通用", "扫描间隔")
global DEBUG_I := IniRead(config_ini_path, "通用", "DEBUG")
Expand All @@ -21,8 +20,6 @@ global current_workbench := ""
; 读取适配工作台列表,用于执行对应热键和快捷键? 返回工作台名称的数组
WORKBENCH_LIST_A := INI_GET_ALL_VALUE_A(config_ini_path, "工作台")

; k_ini := A_ScriptDir "\Lib\CATAlias.ini"

HotIfWinActive "ahk_group GroupCATIA"
{
k_txt := IniRead(alias_ini_path, "HotKey")
Expand Down Expand Up @@ -51,11 +48,11 @@ loop {
switchIMEbyID(IMEmap["en"])
}

; winWaitChange
WinWaitNotActive(activeID)
}
catch Error as err {
AHK_LOGI("循环获取当前窗口失败")
Sleep 100
}
}

Expand Down Expand Up @@ -91,9 +88,6 @@ loop {
else
{
Run "%PROGRAMFILES%\Everything\Everything.exe"
; Run, %PROGRAMFILES%\
; Everything\
; Everything.exe
}

;#+p::
Expand Down Expand Up @@ -197,13 +191,12 @@ isCurrentWindowCATIA() {
}

if (StrUpper(curWin.exe) != "CNEXT.EXE" or SubStr(curWin.title, 1, 8) != "CATIA V5" or SubStr(curWin.class, 1, 4) != "Afx:")
; if (StrUpper(curWin.exe) = "CNEXT.EXE")
{
AHK_LOGI("窗口不匹配 CATIA `n")
AHK_LOGI("未获取到CATIA窗口")
return
}

AHK_LOGI("CATIA窗口 获取成功 `n")
AHK_LOGI("CATIA窗口 获取成功")
return curWin.class
}

Expand Down

0 comments on commit c2b20dd

Please sign in to comment.