/*
Search v0.1
*/
#NoEnv
#Persistent
#SingleInstance, force
SendMode, Input
SetBatchLines, -1
Menu, Tray, NoIcon
Google := "http://www.google.com/search?&q="
Dictionary := "http://dictionary.reference.com/browse/"
GoogleTranslate := "http://translate.google.com/#auto||"
IMDb := "http://www.imdb.com/find?s=all&q="
PirateBay := "http://thepiratebay.org/search/"
YouTube := "http://www.youtube.com/results?search_query="
WolframAlpha := "http://www.wolframalpha.com/input/?i="
Hotkey, ^S, Show
Hotkey, IfWinActive, ahk_class AutoHotkeyGUI
Hotkey, Escape, Cancel
Hotkey, Enter, Submit
Gui, +Owner -Caption +Border
Gui, Add, Edit, x10 y10 h20 w150 vField
Gui, Add, DropDownList, x10 y40 w150 vList, Google||Dictionary|Google Translate|IMDb|Pirate Bay|YouTube|WolframAlpha|
Gui, Color, FFFFFF
return
Show:
Gui, Show
return
Cancel:
Gui, Cancel
return
Submit:
Gui, Submit
if List = Google
Run, %Google%%Field%
else if List = Dictionary
Run, %Dictionary%%Field%
else if List = Google Translate
Run, %GoogleTranslate%%Field%
else if List = IMDb
Run, %IMDb%%Field%
else if List = Pirate Bay
Run, %PirateBay%%Field%
else if List = YouTube
Run, %YouTube%%Field%
else if List = WolframAlpha
Run, %WolframAlpha%%Field%
Reload
return