Skip to content

Commit

Permalink
add select current word
Browse files Browse the repository at this point in the history
  • Loading branch information
no5ix committed Nov 15, 2021
1 parent cfd1338 commit b1c4b22
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions source/action.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ GotoPreDesktop() {
}

RefreshTab() {
send {F5}
send, {F5}
}

ReopenLastTab() {
Expand Down Expand Up @@ -369,7 +369,21 @@ ScreenShotAndSuspend() {

SwapWinCtrlShiftAlt() {
TrayMenu.SetSwapWinCtrlShiftAlt()
TrayMenu.update_tray_menu()()
TrayMenu.update_tray_menu()
}

SelectCurrentWord() {
send, ^{Right}
Sleep, 66
send, ^+{Left}
Sleep, 66
st := GetCurSelectedText()
first_char := SubStr(st, 0, 1)
if (!RegExMatch(first_char, "[a-zA-Z]") && !RegExMatch(first_char, "[\u4e00-\u9fa5]")) {
send, {Left}
sleep, 66
send, ^+{Right}
}
}


Expand Down

0 comments on commit b1c4b22

Please sign in to comment.