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

[REBOL] Re: extending IE with Rebol was RE: Re: Easy-Vid

From: bry:itnisk at: 6-Jan-2004 15:43

>But I think you are in a good idea to explore this avenue. May be
someone >more experienced can explain us SIMPLY what has to be done
>and if this can be done what we need to get as information to start
with. Well I think it's not so much what needs to get done, as in what people would like done. Some things, like using Rebol to get a window by name, would of course require command, and I don't think I could do that. But most of the browser interaction, whether IE or Mozilla I could handle. So here are a list of things: Click on a link in windows - link can be in IE, link can be in a word document, excel, open office documents, could be in a htt template for a folder in the local filesystem found via explorer, etc. This link call rebol and passes it commands, what kinds of commands should rebol be able to accept? I figure to make this powerful it has to pass info about what environment the link was clicked in. The window name, the process id, etc. Extending the right click menu in IE and Mozilla: This is basically a registry hack in IE and if I recall correctly an XUL hack in mozilla. In IE clicking a right context menu calls a modal dialogue window, which can be a local html file, depending on registry settings the particular page is visible or invisible. If invisible the page should just be a script. I don't have any of the ones I was working on at home so I'll just use an example extension from google: If you have the googletoolbar installed you also have a registry entry something like this: [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\&Google Search] @="res://c:\\winnt\\downloaded program files\\GoogleToolbar_en_2.0.95-deleon.dll/cmsearch.html" Contexts =hex:10,00,00,00 res: refers to a html page found as a resource inside of the GoogleToolbar_en_2.0.95-deleon.dll but it could in fact be a local file, if instead of the res protocol file: was used here's a copy of that file: <html> <object id=gg align=top classid="clsid:00EF2092-6AC5-47c0-BD25-CF2D5D657FEB" width=1 height=1 border=0 vspace=0></object> <script language="JavaScript" defer> var parentwin = external.menuArguments; var doc = parentwin.document; var sel = doc.selection; var rng = sel.createRange(); var strhtml = new String(rng.htmlText); var str = strhtml.replace(/<[^>]*>/g," "); str = str.replace(/\s+/g, " "); str = str.replace(/^\s*/,""); str = str.replace(/\s*$/,""); if (str.indexOf(" ") != -1) str = '"' + str + '"'; var bnewwindow = external.menuArguments.event.shiftKey; var url = "" + escape(str); try { url = gg.Search(String(str)); bnewwindow = gg.OpenNewWindow(); } catch (ex) { } if(bnewwindow); else parentwin.navigate(url); </script> </html> so if we wanted to add in right click on explorer that called rebol and passed it some info, all we would have to do is to write a javascript that built up the info we wanted to send and then used location.replace to call the reb:// protocol and pass the info. The technology is pretty simple, what I'm wondering is - what would people want of such a protocol?