Saving data in real time in AIML?

Hello is there a posibility to save data in realtime in AIML?
I spend lot of time by search and write a lot of aiml but if I turn off the myrobotlab and start it again all the data is lost. 

<?xml version = "1.0" encoding = "UTF-8"?>
<aiml version = "1.0.1" encoding = "UTF-8"?>
      <pattern>I am *</pattern>
         Hello <set name = "username"> <star/>! </set>
      <pattern>Good Night</pattern>
         Hi <get name = "username"/> Thanks for the conversation!

In teory i tel the bot what my name is and it is ok until I don't restart AIML. After restart the username is uknown.

moz4r's picture

Hi this it what i use. maybe

Hi this it what i use. maybe it's not a good way , maybe it can help you

bartcam's picture

Working in Realtime and save new aiml file but...

Hello, this works in real time, it is saving new aiml file with all the structure. But it seems that better to save file with data with ex. name and who are in xml format, and get from this file answers.
I konw it is nothing but it work!

<?xml version="1.0" encoding="ISO-8859-2"?>

    <pattern>NEW FILE MY * NAME IS * </pattern>
import xml.etree.cElementTree as NOWY
aiml = NOWY.Element("aiml")
category = NOWY.SubElement(aiml, "category")
NOWY.SubElement(category, "pattern").text = u"WHAT NAME HAS MY <star/>"
NOWY.SubElement(category, "template").text = u"YOUR <star/> NAME IS <star index="2"/>"
tree = NOWY.ElementTree(aiml)
tree.write("nowy.aiml" , encoding='ISO-8859-2', xml_declaration=True)