Quick Search for Autohotkey

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
sinkfaze
Posts: 616
Joined: 01 Oct 2013, 08:01

Quick Search for Autohotkey

12 Dec 2018, 16:54

I found myself in need of it today, so I'm bringing my sole worthwhile contribution to AHK from the old forums to these new ones.

Simple GUI that you can use to quickly search for terms via the forum search or a Google search. This version does a basic check/replace for unsafe URL characters. I keep this in its own script and run it from my main script as needed, but it can easily be adjusted to be added to an existing script.

Hopefully someone finds it useful.

Code: Select all

toEncode :=	[" ","%", """", "#", "&"
 , "/", ":", ";", "<"
 , "=", ">", "?", "@"
 , "[", "\", "]", "^"
 , "``", "{", "|", "}", "~"]

e :=	["+","%25", "%22", "%23", "%26"
 , "%2F", "%3A", "%3B", "%3C"
 , "%3D", "%3E", "%3F", "%40"
 , "%5B", "%5C", "%5D", "%5E"
 , "%60", "%7B", "%7C", "%7D", "%7E"]



Gui, Add, Text, x10 y10 h20, Search Autohotkey's site documentation, or search from Google:
Gui, Add, Edit, yp+20 wp vSearch,
Gui, Add, Button, yp+30 w77 h26 gfSearch, &Forum Search
Gui, Add, Button, xp+85 wp hp ggSearch, &Google It!
Gui, Show, AutoSize Center, Quick Search for Autohotkey
return

fSearch:
gSearch:
Gui, Submit
Gui, Destroy
For i, u in toEncode		; check/replace loop for unsafe chars
	StringReplace, Search, Search, %	u, %	e[i], All
if	(A_ThisLabel="fSearch")		; if the forum search was selected
	Run, https://www.autohotkey.com/boards/search.php?keywords=%Search%		; use the forum search
else	Run, http://www.google.com/search?q=%Search%+site:autohotkey.com		; else use Google search
ExitApp

GuiClose:
Gui, Destroy
ExitApp
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: Quick Search for Autohotkey

13 Dec 2018, 01:34

good simple script but it will be very practical for me
Thank you!!
Donec Perficiam
DRocks
Posts: 565
Joined: 08 May 2018, 10:20

Re: Quick Search for Autohotkey

14 Dec 2018, 05:54

Cool idea thank you
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Quick Search for Autohotkey

14 Dec 2018, 07:38

Thats great :) I immortalized my first attempt with it in a youtube video
Here it is: https://youtu.be/wMzeodCoBcQ (3min) Oops and her normal speed (9min): https://youtu.be/XjADFurmzmo
https://github.com/sl5net/global-Intell ... nction.ahk

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: bastage and 220 guests