Hello,
Thank you for your patience. It is my fault that I have delayed responding... I drastically under-estimated what I was getting into.
As I recall, your original questions dealt with DDE links, and with Hal's constant "user repeating" reminders triggered by your new "auto response" timer-based function. I had explained that DDE links are beyond my current expertise, but that I would like to look at your script and see what I could discern about the "repeating" problem.
First of all, I am impressed by your obvious progress; your code shows that you are an advanced programmer! Your modified script has MANY modifications, including calls to new directories and databases, and other calls outside the script and outside the Ultra Hal program.
Secondly, the number and complexity of your modifications did factor in to my slowness of analysis -- your script kept "locking up" on my computer, apparently because it couldn't find the directories and databases. Also, my anti-virus software tried to block it, because you have a VBS "direct write" command in the script.
In any case, I think that I have a workaround idea for the "repeating" problem. Since you are definitely an experienced programmer, I am confident you will be able to implement it.
Currently, you have the "auto response" routine located earlier in the script than the legacy "user repeating" routine. This is causing the script to execute "auto response," but then detect "repeating" because it sees "AUTO-TOPIC" as the user sentence, over and over again.
The simplest fix, to my mind, would NOT be to move the routines around. Instead, I would do the following:
1. When "auto response" activates, have it store the desired response as a unique variant name, such as HalsTimerStatement.
2. When HalsTimerStatement contains text, also create and set a boolean "flag" variant, such as TimerStatementActive, to "TRUE".
3. Finally, in a completely separate section of code near the very end of the GetResponse function (just before the save variables and so forth), put in the following:
If TimerStatementActive = True Then GetResponse = HalsTimerStatement
4. What will this accomplish? It will preserve your desired dialogue to the very end of the function, and deliver it as the GetResponse, skipping any and all routines in-between that might replace it with something else.
There are no doubt other workaround fixes, but in my opinion, this is the most straightforward.
Thank you again for your patience. I definitely admire the innovation and advanced nature of your work.
Sincerely,
Don