开发者

Autohotkey to select text under cursor?

开发者 https://www.devze.com 2022-12-28 19:22 出处:网络
Is it possible to select text under cursor using Autohotkey specifically, using a mouse and a key combination. e.g. I specifically want to just do a Ctrl-click on any word in IE/FF/Foxit Reader and 开

Is it possible to select text under cursor using Autohotkey specifically, using a mouse and a key combination. e.g. I specifically want to just do a Ctrl-click on any word in IE/FF/Foxit Reader and 开发者_JS百科a webpage with first Google search result opens up. Thank you.


Yes it is possible...

The easiest way is to set Ctrl+LButton to double click (which selects the current word under the cursor) copy the word to the clipboard and then use google with the parameters "q=" for the search term and "btnI=I'm+Feeling+Lucky" for using the "I'm Feeling Lucky" function.

It would look like this:

^LButton::
Send, {LButton 2}^c
Run, http://www.google.com/search?&q=%clipboard%&btnI=I'm+Feeling+Lucky
return

This would work in most cases without issues, the issue comes when selecting words like:

53°C

Jhon's

test%s

and others, because double clicking them only selects the first part of the text before the symbols.

So as long as you are double clicking normal words this should work fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消