Gui, Add, Edit, vEdit gEdit w300, Type something Gui, Show, Autosize, Google - Autocomplete() return Edit: GuiControlGet, Query,, Edit Msgbox, % AutoComplete(query) return GuiClose: ExitApp return ;//////////////////////////////////////////////////////////// ;// Parameters: ;// StringToComplete ;// ReturnValue - CSV (default): Suggestions as a comma separated list ;// - Raw: Raw XML as returned by google ;// ;// LanguageOfResults ;// - The standard two letter language code of the desired results ;// http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ;// ;// Dependencies: ;// httpQuery() http://www.autohotkey.com/forum/topic33506.html ;// uriEncode() http://www.autohotkey.com/forum/topic33506.html&highlight=uriencode ;// ;// by gahks http://autohotkey.net/~gahks ;//////////////////////////////////////////////////////////// AutoComplete(StringtoComplete, ReturnValue="CSV", LanguageofResults="en") { local api_url, url, html, total, list, needle, haystack, pos api_url := "http://google.com/complete/search?hl=" . LanguageofResults . "&xml=true&q=" url := api_url . uriEncode(StringtoComplete) httpQuery(html:="",url) VarSetCapacity(html,-1) if (ReturnValue = "Raw") return html haystack := html needle = is)0x7f) || (Asc(A_LoopField)<0x30) || (asc(A_LoopField)=0x3d)) data .= "%" . ((StrLen(c:=SubStr(ASC(A_LoopField),3))<2) ? "0" . c : c) Else data .= A_LoopField SetFormat,Integer,%b_format% return data } httpQuery(byref Result, lpszUrl, POSTDATA="", HEADERS="") { ; http://www.autohotkey.com/forum/topic33506-30.html ; v0.3.5 (w) Sep, 8 2008 by Heresy & derRaphael / zLib-Style release ; updates Aug, 28 2008 ; currently the verbs showHeader, storeHeader, and updateSize are supported in httpQueryOps ; in case u need a different UserAgent, Proxy, ProxyByPass, Referrer, and AcceptType just ; specify them as global variables - mind the varname for referrer is httpQueryReferer [sic]. ; Also if any special dwFlags are needed such as INTERNET_FLAG_NO_AUTO_REDIRECT or cache ; handling this might be set using the httpQueryDwFlags variable as global global httpQueryOps, httpAgent, httpProxy, httpProxyByPass, httpQueryReferer, httpQueryAcceptType , httpQueryDwFlags ; Get any missing default Values defaultOps = (LTrim Join| httpAgent=AutoHotkeyScript|httpProxy=0|httpProxyByPass=0|INTERNET_FLAG_SECURE=0x00800000 SECURITY_FLAG_IGNORE_UNKNOWN_CA=0x00000100|SECURITY_FLAG_IGNORE_CERT_CN_INVALID=0x00001000 SECURITY_FLAG_IGNORE_CERT_DATE_INVALID=0x00002000|SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE=0x00000200 INTERNET_OPEN_TYPE_PROXY=3|INTERNET_OPEN_TYPE_DIRECT=1|INTERNET_SERVICE_HTTP=3 ) Loop,Parse,defaultOps,| { RegExMatch(A_LoopField,"(?P