ICT
[AutoHotKey] Searching Chinese Character from Naver Dictionary
NeoSailer
2024. 7. 2. 11:48
[Requirements]
Automate below process
- Go to Naver Chinese dictionary
- Input Chinese character saved in buffer(ctrl c)
- Click the first right item from result
[OS]
N/A
[Development Language]
AutoHotKey
[IDE]
Text editor
[Setting]
Install AutoHotKey application
[Code]
^+h::
;Check msedge running
IfWinExist ahk_exe msedge.exe
WinActivate ahk_exe msedge.exe
;Go to web address input
Send {F4}
sleep 300
;Search Chinese character which is copied in buffer(ctrl c)
Send https://hanja.dict.naver.com/#/search?query=
Send ^v{Enter}
;Wait until the search result comes out
WinWaitActive ahk_exe msedge.exe
sleep 3000
;Select the first result
Loop, 12
{
send, {Tab}
}
Send {Enter}
return
Ctrl key = &
Shift key = +
Alt key = +
[Lesson Learned]
- Command keys of AutoHotKey
- Process calling and activating commands
IfWinExist ahk_exe [process name]
WinActivate ahk_exe [process name]
반응형