AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Using Topic Flags in Macros
 
 

ChatScript has a number of token flags that get set if they are matches in the preprocessing. I’m trying to search through the token flags found to use QUESTIONMARK (the flag that is set if the input is flagged as a question) as a condition in a macro.

I’ve been trying something like:

$QuestionFound = no

if (“QUESTIONMARK” IN %TokenFlags) {
$QuestionFound = yes
}

Is there a command that I can use to search for a specific token flag within %TokenFlags? And if so, should I be searching for “QUESTIONMARK” or some corresponding value in place of QUESTIONMARK? Thanks ahead of time for your help!

 

 
  [ # 1 ]

actually, the constant (all numeric constants) get a # in front so
if (%tokenflags & #questionmark)

 

 
  [ # 2 ]

Thanks so much Bruce! That did the trick.

 

 
  login or register to react