Techbot
Pro
Posts: 43
Joined: Sun Aug 24, 2014 4:15 am

Chatbot Studio doesn't recognize code

Wed Feb 25, 2015 2:13 am

The code is from an AIML file called Xfind. It looks like it would allow custom commands for surfing, opening applications, etc. The only problem is, a piece of code isn't recognized by the new SIML standard. Is there an alternate piece that replaces this?

Code: Select all

 <Model>
      <Pattern>XGOOGLE *</Pattern>
      <Response><![CDATA[<a target="_new"   href="http://www.google.com/search?q=<personf/>">]]>  Google Search  <![CDATA[</a>]]></Response>
    </Model>
Attachments
how_long_did_it_take_you_to_spot_it_540.png
how_long_did_it_take_you_to_spot_it_540.png (7.88 KiB) Viewed 1419 times

User avatar
Leslie
Lead Software Architect
Posts: 353
Joined: Fri Sep 14, 2012 12:20 pm
Contact: Website

Re: Chatbot Studio doesn't recognize code

Wed Feb 25, 2015 4:12 pm

It's a very simple piece of code. The intention is to open the Google search result in a new window. The <personf/> tag exchange 1st and 3rd person in the wildcard and then replaces any space character with %20.

Because person substitution is unnecessary here I'll recommend using the <Match /> as a replacement for the <personf/> but if you are concerned about the 1st and 3rd person substitution. Then I'll recommend you to go with <Map Get="person"/>

Techbot
Pro
Posts: 43
Joined: Sun Aug 24, 2014 4:15 am

Re: Chatbot Studio doesn't recognize code

Wed Feb 25, 2015 8:06 pm

Awesome :) Thank you Revarn! I'll try that out this evening

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest