Hi Steve,

> Yes!!! {home alone kid does fist punch)

Hehehe!


> Thank you very much indeed.

You're welcome.


Since it became apparent that this search posed a problem for people
to install, I've incorporated a method for 'discovering' the users
google desktop key automagically and provided the ability to set it
directly within your local prefs (so you don't need to 'discover' it
again every day).

I've attached the changed version. If you hit it as "ggd ?" it'll
tell you how to use the discover switch to find out what the local
google desktop key is.

On a completely unrelated note; I only installed Google Desktop to
play with since you mentioned that you needed a DQSD search for it.
Otherwise I probably never would have bothered with it. I haven't
decided yet if it's something I really care about. It's interesting
that I can now google (via DQSD, of course) normally and see what
results are related to my search in my Outlook, Windows Explorer and
IE history (it reads script and source-code files locally, too, so
it DOES help), and the Outlook part, at least, is very useful. But
I'm still not convinced that it's something I am willing to give up
my privacy for (read the google terms of service to see how they DO
track your usage of the Google Desktop).

Still contemplating features vs invasiveness. If it continues to
provide the effectiveness it has for searching my Outlook messages
and my 'webs' (currently developing 54 websites!) and programming
source code, this is going to be a rather difficult decision.

(I also updated the copy in CVS)

Regards,

Shawn K. Hall
http://ReliableAnswers.com/

'// ========================================================
    Necessity is the plea for every infringement of human 
    freedom. It is the argument of tyrants; it is the creed
    of slaves.
        -- William Pitt (1759-1806)
'// ========================================================

<search function="ggd">
  <name>Google Desktop Search</name>
  <category>Search the Web</category>
  <contributor>Shawn K. Hall</contributor>
  <email>[EMAIL PROTECTED]</email>
  <link>http://desktop.google.com/</link>
  <description>
    Search Google Desktop Search from DQSD<br /><br />
    Since this search requires access to a 'google desktop key' that
is 
    unique to your installation, you must first set a variable
within 
    your localprefs as so:<br /><br />
    <b>var ggd_GoogleKey = "123456789";</b><br />
    You can have this script automagically <b>discover</b> your Key
using<br />
    <b>ggd /discover</b><br />
    Simply use this within your DQSD box and it'll report the
results and set
    the key for the current session. Once the variable is assigned
in 
    LocalPrefs.js you will no longer need to run the discovery
before using 
    the ggd search.<br /><br />
    As with any other search that relies upon other services or
applications,
    you <b>must</b> have the related application/service installed.
Please
    ensure you actually have <i>Google Desktop Search</i> installed
and
    running before requesting assistance.<br /><br />
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td> [term] </td><td> Search Google Desktop </td></tr>
      <tr><td> /about </td><td> About Google Desktop </td></tr>
      <tr><td> /discover </td><td> Discover Google Key </td></tr>
    </table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td> ggd dqsd search  </td></tr>
      <tr><td> ggd asp design   </td></tr>
      <tr><td> ggd /about       </td></tr>
      <tr><td> ggd /discover    </td></tr>
    </table>
  </description>
  <comment>
    This is pretty spiffy, eh?
  </comment>
  <form name="ggdf" method="GET"
        action="http://127.0.0.1:4664/search&amp;s=286122300";>
    <input type="hidden" name="q" value="" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="hidden" value="Search Desktop" name="btnG" />
  </form>
  <script><![CDATA[
    function ggd(q){
        if( nullArgs( "ggd", q ) ){
          return false;
        }
        var args = parseArgs(q, "about, discover");
        for (var i = 0; i < args.switches.length; i++){
          sw = args.switches[i];
          switch(sw.name){
            case "about":
              openSearchWindow("http://desktop.google.com/";);
              return;
            case "discover":
              ggd_discover();
              return;
          }
        }
        document.ggdf.q.value = args.q;
        submitForm(ggdf);
    }

    function ggd_discover(){
        var sUrl = "http://www.google.com/search?q=dqsd";;
        try{
        //attempt to obtain the remote RSS feed
          var xmlHttp = new ActiveXObject("Microsoft.XmlHttp");
          xmlHttp.onreadystatechange = function(){ 
            if (xmlHttp.readyState == 4){
              ggd_discovered( xmlHttp );
            }
          };
          xmlHttp.open("GET", sUrl, true);
          xmlHttp.setRequestHeader ( "Accept", "image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel,
application/msword, application/x-shockwave-flash, */*" );
          xmlHttp.setRequestHeader ( "Accept-Language", "en-us" );
          xmlHttp.setRequestHeader ( "Accept-Encoding", "gzip,
deflate" );
          xmlHttp.setRequestHeader ( "User-Agent", "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" );
          xmlHttp.setRequestHeader ( "Host", "www.google.com" );
          xmlHttp.setRequestHeader ( "Connection", "Keep-Alive" );
          xmlHttp.send(null);
        }catch(e){
          alert("Failure!\n" + e.number + "::" + e.description);
        }
    }

    function ggd_discovered(xh){
        try{
          var r; var s = xh.responseText;
          var rx =
/href='http:\/\/127\.0\.0\.1:4664\/search[^>]s=([\d]*)\?q=dqsd'>/gim
;
          while ((r = rx.exec( s )) != null){var sGoogleKey = r[1];}
          if(sGoogleKey==""){sGoogleKey="Not Found!";}
          document.ggdf.action = "http://127.0.0.1:4664/search&s="; +
sGoogleKey;
          setSearchWindowText("Key: " + sGoogleKey, false);
        }catch(e){
          alert("Failure!\n" + e.number + "::" + e.description +
"\nGoogle Desktop Key: Not Found!");
        }
    }

    if(typeof ggd_GoogleKey != "undefined"){
      if(ggd_GoogleKey != ""){
        document.ggdf.action = "http://127.0.0.1:4664/search&s="; +
ggd_GoogleKey;
      }
    }
  ]]></script>
</search>

'// ========================================================
<search function="ggd">
  <name>Google Desktop Search</name>
  <category>Search the Web</category>
  <contributor>Shawn K. Hall</contributor>
  <email>[EMAIL PROTECTED]</email>
  <link>http://desktop.google.com/</link>
  <description>
    Search Google Desktop Search from DQSD<br /><br />
    Since this search requires access to a 'google desktop key' that is 
    unique to your installation, you must first set a variable within 
    your localprefs as so:<br /><br />
    <b>var ggd_GoogleKey = "123456789";</b><br />
    You can have this script automagically <b>discover</b> your Key using<br />
    <b>ggd /discover</b><br />
    Simply use this within your DQSD box and it'll report the results and set
    the key for the current session. Once the variable is assigned in 
    LocalPrefs.js you will no longer need to run the discovery before using 
    the ggd search.<br /><br />
    As with any other search that relies upon other services or applications,
    you <b>must</b> have the related application/service installed. Please
    ensure you actually have <i>Google Desktop Search</i> installed and
    running before requesting assistance.<br /><br />
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td> [term] </td><td> Search Google Desktop </td></tr>
      <tr><td> /about </td><td> About Google Desktop </td></tr>
      <tr><td> /discover </td><td> Discover Google Key </td></tr>
    </table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td> ggd dqsd search	</td></tr>
      <tr><td> ggd asp design	</td></tr>
      <tr><td> ggd /about	</td></tr>
      <tr><td> ggd /discover	</td></tr>
    </table>
  </description>
  <comment>
    This is pretty spiffy, eh?
  </comment>
  <form name="ggdf" method="GET"
        action="http://127.0.0.1:4664/search&amp;s=286122300";>
    <input type="hidden" name="q" value="" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="hidden" value="Search Desktop" name="btnG" />
  </form>
  <script><![CDATA[
    function ggd(q){
	if( nullArgs( "ggd", q ) ){
	  return false;
	}
	var args = parseArgs(q, "about, discover");
	for (var i = 0; i < args.switches.length; i++){
	  sw = args.switches[i];
	  switch(sw.name){
	    case "about":
	      openSearchWindow("http://desktop.google.com/";);
	      return;
	    case "discover":
	      ggd_discover();
	      return;
	  }
	}
	document.ggdf.q.value = args.q;
	submitForm(ggdf);
    }

    function ggd_discover(){
	var sUrl = "http://www.google.com/search?q=dqsd";;
	try{
	//attempt to obtain the remote RSS feed
	  var xmlHttp = new ActiveXObject("Microsoft.XmlHttp");
	  xmlHttp.onreadystatechange = function(){ 
	    if (xmlHttp.readyState == 4){
	      ggd_discovered( xmlHttp );
	    }
	  };
	  xmlHttp.open("GET", sUrl, true);
	  xmlHttp.setRequestHeader ( "Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*" );
	  xmlHttp.setRequestHeader ( "Accept-Language", "en-us" );
	  xmlHttp.setRequestHeader ( "Accept-Encoding", "gzip, deflate" );
	  xmlHttp.setRequestHeader ( "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" );
	  xmlHttp.setRequestHeader ( "Host", "www.google.com" );
	  xmlHttp.setRequestHeader ( "Connection", "Keep-Alive" );
	  xmlHttp.send(null);
	}catch(e){
	  alert("Failure!\n" + e.number + "::" + e.description);
	}
    }

    function ggd_discovered(xh){
	try{
	  var r; var s = xh.responseText;
	  var rx = /href='http:\/\/127\.0\.0\.1:4664\/search[^>]s=([\d]*)\?q=dqsd'>/gim;
	  while ((r = rx.exec( s )) != null){var sGoogleKey = r[1];}
	  if(sGoogleKey==""){sGoogleKey="Not Found!";}
          document.ggdf.action = "http://127.0.0.1:4664/search&s="; + sGoogleKey;
	  setSearchWindowText("Key: " + sGoogleKey, false);
	}catch(e){
	  alert("Failure!\n" + e.number + "::" + e.description + "\nGoogle Desktop Key: Not Found!");
	}
    }

    if(typeof ggd_GoogleKey != "undefined"){
      if(ggd_GoogleKey != ""){
	document.ggdf.action = "http://127.0.0.1:4664/search&s="; + ggd_GoogleKey;
      }
    }
  ]]></script>
</search>

Reply via email to