Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Rebol SearchBar in IE example

 [1/1] from: bry::itnisk::com at: 24-Mar-2004 21:51


Hi, I wanted to post the early demo of a searchbar for IE using the Rebol/View plugin, mainly cause I figure there are probably some people in this list who still use IE from time to time, and they might find it useful to extend. Then perhaps when the plugin in finished this would be a good demo to get people downloading rebol, obviously part of my incentive on this is my belief that system modifications, extensions are an area for which rebol is especially well suited in Windows, never more so with the plugin now available. This demo consists of the following: 1. a html file hosting the plugin 2. the rebol script, which is basically Kevin Adams search center script adapted for running in the browser search bar and for using the plugin. 3. the registry settings to associate the html file with your search. the html file is as follows: --------------------------------- <html> <script> function go(url){ window.open(url,"_main",""); } function evaluate(code){ var tstring = eval(code); return tstring; } </script> <body> <OBJECT ID="R" CLASSID="CLSID:ADDAB378-54F2- 4D4E-ABBB-E164FC772AAA" CODEBASE="http://www.rebol.com/downloads/plug in/rebolplugin.cab#Version=0,3,0 ,0" WIDTH="200" HEIGHT="700"> <PARAM NAME="LaunchURL" value="/WINNT/Web/searchbar2.r"> </OBJECT> </body> </html> ----------------------------------- the rebol script is as follows: ----------------------------------- REBOL [ Title: "Search Center" Date: 4-Nov-2001 Version: 1.2.2 File: %search2.r Author: "Kevin Adams" Adapted-by: {Bryan Rasmussen to run in IE as searchbar} Needs: "REBOL View/Plugin Dll" Purpose: {Searches various places,such as Google, without having to go to their website.} Email: [kadams--netlane--com] Notes: {A little source code take from Jos Yule's Dictionary Lookup program.} library: [ level: none platform: none type: none domain: [other-net GUI web markup] tested-under: none support: none license: none see-also: none ] ] panel1: layout [ backdrop 219.219.219 across return h2 "Search" 28.52.86 return word_to_lookup: field 120 [ ] return button "Google" 60 effect [gradient 0.0.0] [ do-browser join "go('" join ["http://www.google.com/search?q=" word_to_lookup/text "&btnG=Google+Search"] "' )" ] return button "Dogpile" 60 effect [gradient 0.0.0] [ do-browser join "go('" join ["http://www.dogpile.com/info.dogpl/search/we b/" word_to_lookup/text ] "')" ] return button "HotBot" 60 effect [gradient 0.0.0] [ do-browser join "go('" join ["http://www.hotbot.com/default.asp?query=" word_to_lookup/text &ps=&loc=searchbox&tab=web&provKey=Inktomi ] "')" ] return button "Vivisimo" 60 effect [gradient 0.0.0] [ do-browser join "go('" join ["http://vivisimo.com/search?query=" word_to_lookup/text "&sources=Web"] "')" ] return button "Alexa" 60 effect [gradient 0.0.0] [ do-browser join "go('" join ["http://www.alexa.com/search?q=" word_to_lookup/text] "')" ] ] panel1/offset: 0x0 view center-face panel1 ----------------------------------- You will notice that I removed all the extra panels and such that were in the original script, as I considered that they got in the way when run within the browser. also I set there only to be one search field. the registry settings: -------------------------------------- Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Intern et Explorer\Search] SearchAssistant ="file://c:\\winnt\\web\\sea rchbar.html" CustomizeSearch ="file://c:\\winnt\\web\\sea rchbar.html" ------------------------------------- note of course that you can put it the html file wherever you want but this is what I chose.