Is there any way of doing this?
https://imgur.com/a/Rqrfwjk
I have this code but it is based on the number of pixels moved and not on whether the cursor is over a word
Code: Select all
#If WinActive("ahk_exe chrome.exe") && A_Cursor = "IBeam"
~LButton::
Click
MouseGetPos, x1
SetTimer, Check, 100
SoundBeep, 1500
KeyWait, LButton
SetTimer, Check, Off
SoundBeep, 1000
Return
#If
Check:
MouseGetPos, x2
f := Floor(Abs((x2 - x1) / 110))
Switch
{
Case x2 > x1: Send ^+{Right %f%}
Case x2 < x1: Send % "{Right}^+{Left " f + 1 "}"
}
Return