
<?xml version="1.0" encoding="utf-16"?>
<command id="625" name="wolfram" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape</cmdType>
    <cmdString>http://api.wolframalpha.com/v2/query?appid=[yourAPIkey]&amp;input={1}&amp;format=plaintext</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegExSingle</cmdType>
    <cmdString>Input.*?&lt;plaintext&gt;([^&lt;].*?)&lt;/plaintext&gt;.*?[Result|Definition|approximation].*?&lt;plaintext&gt;([^&lt;].*?)&lt;/plaintext&gt;</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>Results.SetLastResult</cmdType>
        <cmdString>You asked for: {Match.1.1}. {Cr}The answer is: {Match.1.2}</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.RegExReplace</cmdType>
        <cmdString>sqrt\((.*?)\)&amp;&amp;square root of $1</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.Replace</cmdType>
        <cmdString> × &amp;&amp; times </cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.Replace</cmdType>
        <cmdString> | &amp;&amp;, </cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <cmdString>{LastResult}</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <cmdString>{LastResult}</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <cmdString>I'm sorry, I don't know the answer to: {1} Could you speak more clearly, or perhaps try to rephrase your question.</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>OSD.ShowText</cmdType>
        <cmdString>I'm sorry, I don't know the answer to: {CR}{1}{CR}Could you speak more clearly, or perhaps try to rephrase your question.</cmdString>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <phrase>Wolfram</phrase>
  <payloadDictation>payloadDictation: Regular</payloadDictation>
</command>
