Skip to content

Commit

Permalink
Complement of #21 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
pilgrimlyieu authored Sep 3, 2023
1 parent ba67293 commit ed72d28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions Project/OCRC/OCRC.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ OCRC_BaiduOCR(ThisHotkey) {
"translation_type", OCRC_Configs["Baidu_TranType"],
"search_engine", OCRC_Configs["Baidu_SearchEngine"],
"close_and_search", OCRC_Configs["Baidu_CloseAndSearch"],
"search_engines", Baidu_SearchEngines,
)
)
}
Expand Down Expand Up @@ -304,7 +303,4 @@ UpdateHotkey(CtrlObj, *) {
}
}
SwitchHotkey(CtrlObj, *) => (UpdateVar(CtrlObj), Hotkey(OCRC_Configs["Baidu_Hotkey"], OCRC_BaiduOCR, CtrlObj.Value ? "On" : "Off"))
; Debug
!a::SettingGUI()
SwitchHotkey(CtrlObj, *) => (UpdateVar(CtrlObj), Hotkey(OCRC_Configs["Baidu_Hotkey"], OCRC_BaiduOCR, CtrlObj.Value ? "On" : "Off"))
4 changes: 2 additions & 2 deletions Project/OCRC/lib/Baidu.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@
search_engine := CtrlObj.Text, result := this.result
if search_engine == "Everything" {
if InStr(FileExist(result), "D")
Run(this.config["search_engines"]["Everything"] " -parent `"" result "`"")
Run(Baidu_SearchEngines["Everything"] " -parent `"" result "`"")
else
Run(this.config["search_engines"]["Everything"] " -search `"" result "`"")
Run(Baidu_SearchEngines["Everything"] " -search `"" result "`"")
}
else
try Run StrReplace(Baidu_SearchEngines[search_engine], "@W", result, 1)
Expand Down

0 comments on commit ed72d28

Please sign in to comment.