#SingleInstance force Iniread, histroy, settings.ini, Settings, histroy, sort, histroy, D| IfExist, settings.ini { Iniread, others, settings.ini, Settings, others Iniread, last, settings.ini, Settings, last } else { IniWrite, 0, settings.ini, Settings, others IniWrite, 0, settings.ini, Settings, last reload } ;Gui, Show, yCenter xCenter W472 H70,Googlewin GuiActive=0 Menu,Tray,NoStandard Menu,Tray,DeleteAll ;Menu,Tray,Add,Config,Config Menu,Tray,Add,Clear Histroy,clear Menu,Tray,Add Menu,Tray,Add,E&xit,CleanUp Menu,Tray,Default Return combo: gui, submit, nohide If combo is not space cmboxfill(histroy, combo) return cmboxfill(haystack, needle){ If (getkeystate("delete") OR getkeystate("backspace")) Return re =\|\Q%needle%\E(?P.*?)(\||$) regexmatch(haystack, re,Input) len := StrLen(InputRest) sendinput, %InputRest%{shift down}{left %len%}{shift up} } ~esc:: { gosub GuiEscape2 } return Ctrl:: If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) { if GuiActive { GoSub, GuiEscape2 } else { Gui, Color, 000000 gui,add,Picture,x0 y-5, back.png ;Gui, Font, S10 CBlue,EuroseWide Heavy ;gui,add,text,cBlue,Quick Google Gui, +LastFound +ToolWindow +alwaysontop WinSet, Transparent, 50 WinSet, Region, 5-5 W460 H70 R10-10 Gui, -Caption Gui, Font, S22 Default Cblack, EuroseWide Heavy ;Gui, Add, Edit, x10 y25 w450 h40 Gui, Add, ComboBox,r5 gcombo vcombo +vscroll x10 y10 w450 h40,%histroy% Gui, Add, Button, w0 h0 Default, &Open Gui, Show, yCenter xCenter W472 H100, Googlewin GuiActive = 1 FadeIn(250, "Googlewin") KeyWait, RCTRL } } Return ButtonOpen: { ControlGetText, search, Edit1,Googlewin histroy=%histroy%|%search% IniWrite, %histroy%, settings.ini, Settings, histroy google = http://www.google.com/search?q=%search% run %google% GoSub, GuiEscape2 } ~lbutton:: { IfWinActive Googlewin { return } else { if GuiActive { gosub GuiEscape2 gui,destroy } } } return FadeIn(GUI_TRANS, WinName) { transL := 0 Loop, 10 { transL += GUI_TRANS//10 WinSet, Transparent, %transL%, %WinName% Sleep, 10 } } FadeOut(GUI_TRANS, WinName) { transL := GUI_TRANS Loop, 10 { transL -= GUI_TRANS//10 WinSet, Transparent, %transL%, %WinName% Sleep, 10 } gui,destroy } Return config: { Gui 2: Add, Text, x16 y6 w130 h20 , Show other search options: if (others=1) { Gui 2: Add, Radio, x156 y6 w40 h20 checked vother, Yes Gui 2: Add, Radio, x196 y6 w40 h20 vnoother, No } else { Gui 2: Add, Radio, x156 y6 w40 h20 vother, Yes Gui 2: Add, Radio, x196 y6 w40 h20 checked vnoother, No } Gui 2: Add, Button, x156 y36 w80 h20 gsave, Save Gui 2: Show, x135 y95 h64 w238, Config } return save: { gui 2:submit IniWrite, %other%, settings.ini, Settings, others } reload GuiEscape2: GuiActive = 0 FadeOut(250, "Googlewin") ControlSetText, Edit1, ,Googlewin Gui, Hide gui,destroy Return clear: { IniWrite, "", settings.ini, Settings, histroy histroy= } return CleanUp: gui,submit IniWrite, %last%, settings.ini, Settings, last ExitApp