AutoHotkey Online Help with F1

Post your working scripts, libraries and tools for AHK v1.1 and older
icuurd12b42
Posts: 202
Joined: 14 Aug 2016, 04:08

AutoHotkey Online Help with F1

08 Sep 2017, 20:57

After 3 hours of trying to add F1 help for selected AHK functions in Visual Studio Code

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
ctrl+F1 for docs
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...
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AutoHotkey Online Help with F1

09 Sep 2017, 00:12

https://duckduckgo.com?q=" . txt . "&site:https://www.autohotkey.com/boards

Not sure if this works more reliable?!
icuurd12b42
Posts: 202
Joined: 14 Aug 2016, 04:08

Re: AutoHotkey Online Help with F1

09 Sep 2017, 00:27

https://search.site.com/q=search site:www.sitename.com/whatnot
is pretty much the adopted standard for all search engines now. so not sure about passing site as a second argument...

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 50 guests