The Current release uses “Environment.CurrentDirectory” but the application I use changes the original “Environment.CurrentDirectory” to another locataion. I need to find a way to set the PathToAIML and the PathToConfigFiles back to the true location.
I am not that great with C, how can I make the change.
Do I make a
public string PathToAIML
Not Sure What Goes Here???;
Take a look at the Bot class. From around line 337 you'll notice the methods used to load the config files into the bot are all overridden so you can specify either the path to the file or use an XmlDocument object that you've loaded yourself. Rather than let the bot set itself up with the defaults you'll have to code these steps yourself.
Let me know how you get on...
Another strategy would be to change the code in the Bot class so you have something like this (remembering to do this also for the other "PathTo" attributes:
// to hold the path to the AIML files
private string pathtoaiml = string.Empty;
258 /// <summary>
259 /// The directory to look in for the AIML files
260 /// </summary>
261 public string PathToAIML
this.pathtoaiml = Path.Combine(Environment.CurrentDirectory, this.GlobalSettings.grabSetting("aimldirectory"));
this.pathtoaiml = value;
That worked great. Thanks