chrome 查词 截图 收集单词
#IfWinActive ahk_exe msedge.exe
{
^!`::screen()
; 有道查词
`::searchWord1()
; 收集单词
!`::collectWord()
}
#IfWinActive ahk_exe chrome.exe
{
^!`::screen()
; 有道查词
`::searchWord2()
; 收集单词
!`::collectWord()
}
#IfWinActive ahk_exe mspaint.exe
{
!w::SendInput, {WheelUp}
!s::SendInput, {WheelDown}
}
searchWord2(){
Click right
SendInput, {S}
SendInput, {Enter}
}
searchWord1(){
Click right
SendInput, {Up 3}
SendInput, {Enter}
}
collectWord(){
clipboard = ; 让剪贴板初始为空, 这样可以使用 ClipWait 检测文本什么时候被复制到剪贴板中.
Send ^c
ClipWait
FileAppend, ===%A_Year%-%A_MM%-%A_DD%-%A_Hour%-%A_Min%-%A_Sec%`n%clipboard% `n`n, %A_ScriptDir%\english_learn_note.txt,UTF-8
ToolTip, added#
SetTimer, RemoveToolTip, -1000
return
RemoveToolTip:
ToolTip
return
}
screen(){
SendInput, {F12}
Sleep, 1000
SendInput, {CtrlDown}{ShiftDown}p{ShiftUp}{CtrlUp}
Sleep, 1000
SendInput, capture full
Sleep, 500
SendInput, {Enter}
Sleep, 3000
SendInput, {F12}
}
#y::Suspend