Toady Posted July 25, 2008 Share Posted July 25, 2008 (edited) Here is an example of using Google suggest. As you type in a keyword, a list of suggestions are populated below. Scripts use XMLHTTPRequest to accomplish the task. Probably error prone, but like I said its just an example. Two examples shown below, one is regular Google suggest and other is YouTube suggest.Ex 1) Google Suggestexpandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> _Singleton('GoogleSuggest.au3') Opt('GUICloseOnESC', 1) GuiCreate('Google Suggest', 200, 190) $input = GUICtrlCreateInput("",10,10,180) $listbox = GUICtrlCreateList("",10,30,180) GuiSetState() Dim $objXMLHTTP = ObjCreate("Microsoft.XMLHTTP") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $IDFrom, $iCode $IDFrom = BitAND($wParam, 0xFFFF) $iCode = BitShift($wParam, 16) If $IDFrom <> $input Then Return If GUICtrlRead($input) = "" Then GUICtrlSetData($listbox,"") Return EndIf GUICtrlSetData($listbox,"") $objXMLHTTP.open("GET","http://suggestqueries.google.com/complete/search?output=firefox&client=&qu=" & GUICtrlRead($input),true) $objXMLHTTP.send("") Dim $strReturn = StringRegExpReplace($objXMLHTTP.responseText,"(.*\[)|(\].*)|""","") If $strReturn = "" Then Return GUICtrlSetData($listbox,StringRegExpReplace($strReturn,",","|"),GUICtrlRead($input)) EndFuncoÝ÷ Ù±1Ù.NæÞJè zËm«¢+Ø¥¹±Õ±Ðí]¥¹½ÝÍ ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíU% ½¹ÍѹÑÍà¹ÔÌÐì(¥¹±Õ±Ðí5¥Í¹ÔÌÐì()}M¥¹±Ñ½¸ Ìäíe½ÕQÕÕÍйÔÌÌäì¤)=ÁÐ ÌäíU% ±½Í=¹MÌäì°Ä¤)Õ¥ ÉÑ Ìäíe½ÕQÕMÕÍÐÌäì°ÈÀÀ°ÄäÀ¤(ÀÌØí¥¹ÁÕÐôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°ÄàÀ¤(ÀÌØí±¥ÍѽàôU% Ñɱ ÉÑ1¥ÍÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÌÀ°ÄàÀ¤)Õ¥MÑMÑÑ ¤()¥´ÀÌØí½©a51!QQ@ô=© ÉÑ ÅÕ½Ðí5¥É½Í½Ð¹a51!QQ@ÅÕ½Ðì¤)U%I¥ÍÑÉ5Í ÀÌØí]5} =559°ÅÕ½Ðí]5} =559ÅÕ½Ðì¤()]¡¥±Ä($ÀÌØíµÍôU%Ñ5Í ¤(%M±Ð($% ÍÀÌØíµÍôÀÌØíU%}Y9Q} 1=M($$%á¥Ð(%¹M±Ð)]¹()Õ¹]5} =559 ÀÌØí¡]¹°ÀÌØí5Í°ÀÌØíÝAÉ´°ÀÌØí±AÉ´¤(%1½°ÀÌØí%ɽ´°ÀÌØí¥ ½($ÀÌØí%ɽ´ô ¥Ñ9 ÀÌØíÝAÉ´°Áá¤($ÀÌØí¥ ½ô ¥ÑM¡¥Ð ÀÌØíÝAÉ´°Äؤ(%%ÀÌØí%ɽ´±ÐìÐìÀÌØí¥¹ÁÕÐQ¡¸IÑÕɸ(%%MÑÉ¥¹IáÁIÁ±¡U% ÑɱI ÀÌØí¥¹ÁÕФ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤ôÅÕ½ÐìÅÕ½ÐìQ¡¸($%U% ÑɱMÑÑ ÀÌØí±¥Íѽà°ÅÕ½ÐìÅÕ½Ðì¤($%IÑÕɸ(%¹%(%U% ÑɱMÑÑ ÀÌØí±¥Íѽà°ÅÕ½ÐìÅÕ½Ðì¤($ÀÌØí½©a51!QQ@¹½Á¸ ÅÕ½ÐíPÅÕ½Ðì°ÅÕ½Ðí¡ÑÑÀè¼½ÍÕÍÑÅÕɥ̹½½±¹½´½½µÁ±Ñ½ÍÉ ý¡°õ¸µÀíÌõåеÀí©Í½¸õеÀí©Í½¹ÀôµÀíÄôÅÕ½ÐìµÀìU% ÑɱI ÀÌØí¥¹ÁÕФ±ÑÉÕ¤($ÀÌØí½©a51!QQ@¹Í¹ ÅÕ½ÐìÅÕ½Ðì¤(%¥´ÀÌØíÉÑÕɹÍÐôMÑÉ¥¹MÁ±¥Ð ÀÌØí½©a51!QQ@¹ÉÍÁ½¹ÍQáаÅÕ½Ðít±lÅÕ½Ðì°Ä¤(%¥´ÀÌØíÍÑÉIÑÕɸôMÑÉ¥¹IáÁIÁ± ÀÌØíÉÑÕɹÍÑlÅt°ÅÕ½Ðì ÀäÈíl¸¨ÀäÈíl¥ðÅÕ½ÐìÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%%ÀÌØíÍÑÉIÑÕɸôÅÕ½ÐìÅÕ½ÐìQ¡¸IÑÕɸ(%U% ÑɱMÑÑ ÀÌØí±¥Íѽà±MÑÉ¥¹IáÁIÁ± ÀÌØíÍÑÉIÑÕɸ°ÅÕ½Ðì°ÅÕ½Ðì°ÅÕ½ÐíðÅÕ½Ð줱U% ÑɱI ÀÌØí¥¹ÁÕФ¤)¹Õ¹ Edited August 5, 2008 by Toady www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
James Posted July 25, 2008 Share Posted July 25, 2008 I cant cloe after searching. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
ptrex Posted July 28, 2008 Share Posted July 28, 2008 @Toady Very nice !! Works like a charm regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Toady Posted August 5, 2008 Author Share Posted August 5, 2008 Added YouTube suggest, see example #2. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Minikori Posted August 5, 2008 Share Posted August 5, 2008 I know that firefox has suggestions as you type your search querie. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now