1. /*
  2. Search v0.1
  3. */
  4.  
  5. #NoEnv
  6. #Persistent
  7. #SingleInstance, force
  8. SendMode, Input
  9. SetBatchLines, -1
  10. Menu, Tray, NoIcon
  11.  
  12. Google := "http://www.google.com/search?&q="
  13. Dictionary := "http://dictionary.reference.com/browse/"
  14. GoogleTranslate := "http://translate.google.com/#auto||"
  15. IMDb := "http://www.imdb.com/find?s=all&q="
  16. PirateBay := "http://thepiratebay.org/search/"
  17. YouTube := "http://www.youtube.com/results?search_query="
  18. WolframAlpha := "http://www.wolframalpha.com/input/?i="
  19.  
  20. Hotkey, ^S, Show
  21. Hotkey, IfWinActive, ahk_class AutoHotkeyGUI
  22. Hotkey, Escape, Cancel
  23. Hotkey, Enter, Submit
  24.  
  25. Gui, +Owner -Caption +Border
  26. Gui, Add, Edit, x10 y10 h20 w150 vField
  27. Gui, Add, DropDownList, x10 y40 w150 vList, Google||Dictionary|Google Translate|IMDb|Pirate Bay|YouTube|WolframAlpha|
  28. Gui, Color, FFFFFF
  29. return
  30.  
  31. Show:
  32. Gui, Show
  33. return
  34.  
  35. Cancel:
  36. Gui, Cancel
  37. return
  38.  
  39. Submit:
  40. Gui, Submit
  41. if List = Google
  42. Run, %Google%%Field%
  43. else if List = Dictionary
  44. Run, %Dictionary%%Field%
  45. else if List = Google Translate
  46. Run, %GoogleTranslate%%Field%
  47. else if List = IMDb
  48. Run, %IMDb%%Field%
  49. else if List = Pirate Bay
  50. Run, %PirateBay%%Field%
  51. else if List = YouTube
  52. Run, %YouTube%%Field%
  53. else if List = WolframAlpha
  54. Run, %WolframAlpha%%Field%
  55. Reload
  56. return