Batch Googler and String Sorter

Post your working scripts, libraries and tools
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

Batch Googler and String Sorter

25 Jul 2015, 13:16

Have you ever had to Google several things all at once, but didn't want to open a new tab each time? Have you ever wanted to alphabetize or randomize a list without finding a website that can do it for you? Okay, maybe not. Still, these scripts might be handy.

Update 8/19/2015 - Fixed Googler's tooltip text and title being swapped

QuickStart is recommended for use with these scripts; it even has built-in support! (just uncomment a few lines)

Googler.ahk (#Include after auto-execute section if used with another script; use GoSub GoogleGui)

Code: Select all

GoogleGui:
	Gui, Destroy
	Gui, Font, s10, Consolas
	Gui, Add, Edit, x5 y5 w215 h180 vGoogleList
	Gui, Add, Button, x5 y190 w105 h30 +Default gBatchGoogle, Google it!
	Gui, Add, Button, x115 y190 w105 h30 gGuiClose, Cancel
	Gui, Show, w225 h225, Batch Googler
	Gui, Font
Return

BatchGoogle:
	Gui, Submit
	Gui, Destroy
	GoogleCount =
	Loop, Parse, GoogleList, `n
		If ( A_LoopField ) {
			GoogleCount++
			Run http://www.google.com/#q=%A_LoopField%
		}
	TrayTip, Batch Googler, %GoogleCount% queries Googled!
	GoogleCount =
Return

; Escape if these labels they are already used by the main script
GuiClose:
GuiEscape:
	Gui, Destroy
Return
Sorter.ahk (#Include after auto-execute section if used with another script; use GoSub ABCGui)

Code: Select all

ABCGui:
	Gui, Destroy
	Gui, Font, s10, Consolas
	Gui, Add, Edit, x5 y5 w215 h180 vAlphabetList
	Gui, Add, Button, x5 y190 w105 h30 +Default gAlphabetize, Alphabetize!
	Gui, Add, Button, x115 y190 w105 h30 gReverseAlphabetize, Ezitebahpla! ; Alphabetize backwards
	Gui, Add, Button, x5 y225 w105 h30 gRandomAlphabetize, Randomize!
	Gui, Add, Button, x115 y225 w105 h30 gGuiClose, Done
	Gui, Show, w225 h260, Alphabetron 3000
	Gui, Font
Return

Alphabetize:
	Gui, Submit, NoHide
	Sort AlphabetList
	GuiControl, , AlphabetList, %AlphabetList%
Return

ReverseAlphabetize:
	Gui, Submit, NoHide
	Sort AlphabetList, R
	GuiControl, , AlphabetList, %AlphabetList%
Return

RandomAlphabetize:
	Gui, Submit, NoHide
	Sort AlphabetList, Random
	GuiControl, , AlphabetList, %AlphabetList%
Return

; Escape if these labels they are already used by the main script
GuiClose:
GuiEscape:
	Gui, Destroy
Return
Last edited by Hactar on 19 Aug 2015, 13:20, edited 5 times in total.
hyleaf

Re: Batch Googler and String Sorter

26 Jul 2015, 08:58

Thank you! I'm now using both.
jsauber
Posts: 4
Joined: 30 Apr 2015, 11:22

Re: Batch Googler and String Sorter

27 Jul 2015, 11:48

When I ran Googler I had to add the button label function for GuiClose. After that I was able to get the GUI to work without error. I then typed in 3 random searches which resulted in 3 new tabs of Google.com with new search results. Has anyone else experienced this?
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

Re: Batch Googler and String Sorter

27 Jul 2015, 15:05

jsauber wrote:When I ran Googler I had to add the button label function for GuiClose. After that I was able to get the GUI to work without error. I then typed in 3 random searches which resulted in 3 new tabs of Google.com with new search results. Has anyone else experienced this?
Sorry, that is my error. I copy/pasted these out of another larger script I am using which already has that subroutine. I will update the scripts now. ;)
jsauber
Posts: 4
Joined: 30 Apr 2015, 11:22

Re: Batch Googler and String Sorter

27 Jul 2015, 15:14

Hactar,
Thanks for the quick update. I am still experiencing the issue where only the google page shows up with no search results. I am using IE so that may be the issue. I will try using this on Chrome when I get home.
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

Re: Batch Googler and String Sorter

27 Jul 2015, 15:22

jsauber wrote:Hactar,
Thanks for the quick update. I am still experiencing the issue where only the google page shows up with no search results. I am using IE so that may be the issue. I will try using this on Chrome when I get home.
It is probably IE; I am using Firefox and the results show up just fine. Well, in a few days IE will bite the dust once and for all! Windows 10 hype
jsauber
Posts: 4
Joined: 30 Apr 2015, 11:22

Re: Batch Googler and String Sorter

29 Jul 2015, 12:03

Just ran this using chrome and fire fox and had no luck. Same results. It opens the proper amount of tabs but it does not run the queries. This is a great idea thanks for the work. I hope others get to enjoy it. I have yet to try it on my home PC. I will test there at some point and provide feedback
jsauber
Posts: 4
Joined: 30 Apr 2015, 11:22

Re: Batch Googler and String Sorter

29 Jul 2015, 18:17

I just tested at home and it works great. Excellent hotkey this will be used quite often.
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

Re: Batch Googler and String Sorter

29 Jul 2015, 19:59

jsauber wrote:Just ran this using chrome and fire fox and had no luck. Same results. It opens the proper amount of tabs but it does not run the queries. This is a great idea thanks for the work. I hope others get to enjoy it. I have yet to try it on my home PC. I will test there at some point and provide feedback
jsauber wrote:I just tested at home and it works great. Excellent hotkey this will be used quite often.
Try making sure you have the latest version of those browsers installed on your work computers. If all else fails you can analyze the URL when you normally Google something and then type that into the script. I'm glad you got it working eventually though. :)

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 71 guests