-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
; @description 如题 | ||
; @author [email protected] | ||
; @version 2.1.1(20200606) | ||
|
||
; | ||
; 2021-04-15 更新 @telppa:[修改了一下语音识别模块的代码。・Issue #14・snolab/CapsLockX]( https://github.com/snolab/CapsLockX/issues/14 ) | ||
; | ||
CapsLockX_AppendHelp(" | ||
( | ||
讯飞语音悬浮窗 | ||
|
@@ -12,25 +14,28 @@ CapsLockX_AppendHelp(" | |
Return | ||
|
||
#IF !CapsLockXMode | ||
#if !CapsLockXMode | ||
|
||
#h:: | ||
If (WinExist("ahk_class UIIFlyVoiceFrame ahk_exe iFlyVoice.exe")){ | ||
; 原方案使用热键触发 | ||
; Send ^+h | ||
; 新方案直接发送模拟点击消息 | ||
ControlClick, x0 y0, ahk_class UIIFlyVoiceFrame ahk_exe iFlyVoice.exe | ||
#h:: 讯飞语音输入法切换() | ||
讯飞语音输入法切换(){ | ||
; 注册表里取路径 | ||
RegRead, iFlyPath, HKLM\SOFTWARE\iFly Info Tek\iFlyIME, Install_Dir_Ver2 | ||
; 非空检查,确保 iFlyPath 有值 | ||
iFlyPath := (iFlyPath ? iFlyPath : "C:\Program Files (x86)\iFly Info Tek\iFlyIME\2.1.1708") | ||
iFlyWnd := WinExist("ahk_class UIIFlyVoiceFrame ahk_exe iFlyVoice.exe" ) | ||
If (iFlyWnd){ | ||
ControlClick, x20 y20, ahk_id %iFlyWnd% | ||
}Else{ | ||
If (FileExist("C:\Program Files (x86)\iFly Info Tek\iFlyIME\2.1.1708\iFlyVoice.exe")){ | ||
Run "C:\Program Files (x86)\iFly Info Tek\iFlyIME\2.1.1708\iFlyVoice.exe" | ||
If (FileExist(iFlyPath "\iFlyVoice.exe")){ | ||
Run "%iFlyPath%\iFlyVoice.exe" | ||
}else{ | ||
MsgBox, 4, , 你似乎还没有安装讯飞语音输入法,是否现在下载安装包并【手动安装】到默认目录? | ||
IfMsgBox, NO, Return | ||
UrlDownloadToFile https://download.voicecloud.cn/200ime/iFlyIME_Setup_2.1.1708.exe, %TEMP%/iFlyIME_Setup_2.1.1708.exe | ||
Run %TEMP%/iFlyIME_Setup_2.1.1708.exe | ||
} | ||
} | ||
Return | ||
} | ||
|
||
; 加 Alt 访问原热键 | ||
#!h:: Send #h |