See this thread: https://autohotkey.com/boards/viewtopic ... 60&t=12525
I had a facepalm moment and did the obvious... I made a AHK script, duh
[5 edits later...there that should cover everything]
Code: Select all
#SingleInstance FORCE
#Persistent
SetTitleMatchMode, 2
#IfWinActive .ahk
^F1::
clipboard := ""
send ^c
sleep,100
txt := StrReplace(trim(clipboard),"#","")
if(txt<>"")
{
site := "https://duckduckgo.com?q=" . txt . " site:https://www.autohotkey.com/docs/"
Run %site%
}
return
#IfWinActive .ahk
+F1::
clipboard := ""
send ^c
sleep,100
txt := StrReplace(trim(clipboard),"#","")
if(txt<>"")
{
site := "https://duckduckgo.com?q=" . txt . " site:https://www.autohotkey.com/boards"
Run %site%
}
return
shift+F1 for forum
I left F1 alone so not to interfere with the default F1 action of the app...
Works in Visual Studio Code, Notepad++, Notepad... and should for any editor that show a <filename>.ahk in it's title bar...