[alicebot-general] ALICE Launching Programs
mehri
foreverlinux at yahoo.com
Sat Aug 5 12:41:47 PDT 2006
If you write a wrapper.exe of some type I'd then put it in a srai for exception handling:
<srai>wrapper call <system>wrapper.exe command.exe</system></srai>
And have the wrapper.exe return specific codes or strings for errors
For example:
<pattern>wrapper call 401*</pattern>
<template>I am sorry, but system call <star/> cannot be found</template>
<pattern>wrapper call 403 * </pattern>
<template>The program <star/> has timed out</template>
<pattern>wrapper call 404 * </pattern>
<template><star/></template>
You could even use the <set> to set that the last system call was a success or not.
----- Original Message ----
From: Dr. Rich Wallace <drwallace at gmail.com>
To: mehri <foreverlinux at yahoo.com>; Alicebot and AIML General Discussion <alicebot-general at list.alicebot.org>
Sent: Saturday, August 5, 2006 1:29:35 PM
Subject: Re: [alicebot-general] ALICE Launching Programs
One precaution you should consider in any real-world time-critical
application using the <system> command, is that AIML has no mechanism
for exception handling. So, if your command.exe runs forever, or
causes a crash, there is no way for AIML to recover. It is therefore
prudent to write a wrapper.exe to handle such unforseen circumstances
and use the <system> command to call the wrapper.exe program, rather
than the application directly, unless you have a lot of confidence
that the program you are calling will terminate normally in a timely
fashion.
On 8/5/06, mehri <foreverlinux at yahoo.com> wrote:
> If you want to silence your system command do this:
> <think><system>commandgoeshere.exe</system></think>
>
> The most common usage of <system> is for users to be able to use external applications to help form responses from their bot. So most interpreters pass the system command to the OS, and return the text from that call.
>
> The specification of system:
> http://www.alicebot.org/TR/2001/WD-aiml/#section-system
>
> Leaves the text being returned pretty open:
> The system element may return a value.
>
> But usually its the returned text of the program executing.
>
>
>
> ----- Original Message ----
> From: Frank Plummer <frank.plummer at zemitec.co.uk>
> To: alicebot-general at list.alicebot.org
> Sent: Saturday, August 5, 2006 12:36:08 PM
> Subject: Re: [alicebot-general] ALICE Launching Programs
>
>
> Don't worry, it's nothing mechanically related. She will just be asked to do
> simple tasks, such as call someone, send a message on IRC, etc. Thanks for
> this, pal.
>
> One thing. When I insert the <system> and </system> tag, ALICE just seems to
> say it as if it were text. What's wrong here?
> --
> View this message in context: http://www.nabble.com/ALICE-Launching-Programs-tf2053672.html#a5666544
> Sent from the Alicebot General forum at Nabble.com.
>
> _______________________________________________
> This is the alicebot-general mailing list
> Reply to alicebot-general at list.alicebot.org
> Unsubscribe and change preferences at http://list.alicebot.org/mailman/listinfo/alicebot-general
> Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
> Learn to read at http://www.literacy.org/
>
>
>
>
> _______________________________________________
> This is the alicebot-general mailing list
> Reply to alicebot-general at list.alicebot.org
> Unsubscribe and change preferences at http://list.alicebot.org/mailman/listinfo/alicebot-general
> Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
> Learn to read at http://www.literacy.org/
>
More information about the alicebot-general
mailing list