AI Zone Admin Forum Add your forum

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

System command example?

First let me say thank you.. I’ve been reading on this forum and there is allot of great people and very useful information.

I’ve installed the 1.28 version and have some very good success.  One of the things I’d like to do is interact with the OS.  I tried adding a simple rule to create a file, but I do get a dump and the server fails when I trigger the rule.

u: (what time is it) ^system(touch bb.txt)

I want to get to the point of running some OS commands and bring the results back to the bot, but figured the first place to start is just running a command.

Thank you!



  [ # 1 ]

Hi, Brian, and welcome to! smile

Just out of curiosity, what are the specs of the system you’ve got ChatScript running on? I’m mainly interested on which OS is used, actually.

I ask because I don’t know of any Windows-based system commands like ‘touch’. I’m guessing that it’s a *nix or Mac command, but I have no clue as to implementation or proper syntax on the command line, and thus have no idea of what the expected output from such a command might be.


  [ # 2 ]

Dave, Thank you for the quick reply.

The example is Linux Redhat 32 bit.  I did try on windows with:

^system(echo “test” > bb.txt)

Unfortunately I had the same result with the program crashing.

Thank you!


  [ # 3 ]

Dave, yes, ‘touch’ is a *nix command,  it basically just updates the last modified time/access time of a file to be equal to the current system date/time.

Brian - this is a shot in the dark, but perhaps the double quotes need to be escaped?
system(echo \“test\” > bb.txt)
Perl command for that for example could be:system(“echo \“test\” > hello.txt”);

or, if you want to use single quotes, then your actual command that goes to your command interpreter could contain double quotes..
system(‘echo \“test\” > hello.txt’);



  [ # 4 ]

I think that I would also try to execute a command that does not require any quotes, just to see if that’s where the problem lies. I’ve been fighting with system crashes, so I don’t currently have ChatScript installed, but I’ll try to find time later today to install the latest version and do some testing.


  [ # 5 ]

I did try:


Still getting a crash.  I did find this in the Event viewer:

Faulting application chatscript.exe, version, faulting module chatscript.exe, version, fault address 0x00018760.

For more information, see Help and Support Center at


  [ # 6 ]

OK. Gang. I have debugged the problem. My fault. New version to release on Sunday.



  [ # 7 ]

Glad to hear it, Bruce. I got ChatScript installed, but realized that I have yet to install Visual Studio, as well, so I wasn’t able to do more than confirm the problem. Boy, have I been slacking! :D Oops?


  [ # 8 ]

Bruce,  Thank you.  I’ve been able to now get this working.

Now I just have to figure out how to take advantage of the feature smile

Thank you!


  [ # 9 ]

That’s what I like. Someone who wants a feature but doesn’t know how they are going to use it.  Enjoy.


  login or register to react
‹‹ Pronoun resolution and Rosette      License? ››