I had reason to use the msk search today and it did not work, according to help msk 871122 should work but it appends a Q which is not recognised. The attached version has this removed. However it's not extensively tested for other options so I cannot guarantee success.

Cheers,

Tom.
<search function="msk">
  <name>Microsoft Knowledge Base</name>
  <category>Computers<category>Reference</category></category>
  <contributor>Ryan Edwards, MLL, Glenn Carr</contributor>
  <link>http://support.microsoft.com/search/</link>
  <email>glenn at glenncarr dot com</email>
  <description>Search the Microsoft Knowledge Base
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td>/google</td><td> - </td><td>Use Google to search support.microsoft.com</td></tr>
    </table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td>msk Windows Bugs</td></tr>
      <tr><td>msk q252795</td></tr>
      <tr><td>msk Windows Bugs /google</td></tr>
      <tr><td>msk q252795 /google</td></tr>
    </table>
  </description>
  <form name="mskf"
        method="get"
        action="http://support.microsoft.com/search/default.aspx";>
    <input type="hidden" name="catalog" value="LCID=1033" />
    <input type="hidden" name="spid" value="global" />
    <input type="hidden" name="query" value="" />
    <input type="hidden" name="adv" value="" />
  </form>
  <form name="mskggf"
        action="http://www.google.com/search";
        method="get">
    <input type="hidden" name="q"/>
  </form>
  <script><![CDATA[
    function msk(q)
    {
      if( nullArgs("msk", q) )
        return;

      // Parse switches with parseArgs:

      // parseArgs usage:
      // Arguments:
      //    q                - string from the search function
      //    expectedSwitches - list or array of the expected switch values
      //    expandSwitches   - optional parameter [default = true] used to determine 
      //                       if the switch shortcuts should be expanded (i.e. /f becomes /foo)
      // Returns an object with these properties:
      //    q        - the input string with the switches removed
      //    switches - array of objects with these two properties:
      //                  name:   expanded name of the matched switch (i.e. foo as in /foo:bar)
      //                  value:  value of switch (i.e. bar as in /foo:bar)
      //    switch_val - associative array with the switch name as the key with the switch value 
      //                 as the value. (i.e. switch_val["foo"] = "bar" as in /foo:bar)

      var args = parseArgs(q, "google");
      if ( args.switches.length > 0 )
      {
        switch( args.switches[0].name )
        {
          case "google":
            document.mskggf.q.value = args.q + " site:support.microsoft.com";
            submitForm(mskggf);
            return;
        }
      }

      if ( res = args.q.match(/^\s*[qQ]?(\d{6})\s*$/) )
        document.mskf.query.value = res[1];
      else
        document.mskf.query.value = args.q;
      submitForm(mskf);
    }
  ]]></script>
  <copyright>
    The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
    Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
  <created_by>
    This search file was initially created on 01/04/07 at 21:20:51
    by Dave's Quick Search Deskbar Search Wizard version 1.3,
    Copyright (c) 2002 Glenn Carr; Distributed under the terms of the GNU General Public License, Version 2
  </created_by>
</search>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
To unsubscribe visit:
https://lists.sourceforge.net/lists/listinfo/dqsd-users
DQSD-Users@lists.sourceforge.net
http://sourceforge.net/mailarchive/forum.php?forum_id=8601

Reply via email to