Author Topic: Don  (Read 4011 times)

Psych

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Don
« on: December 24, 2003, 06:31:30 am »
Hi Don,

I mailed you a copy of my Hal Brain as you requested.

I haven't heard anything back, so wondered if you got it?

Regards

Psych
ITS NOT WHAT YOU THINK THAT MAKES YOU HUMAN --- ITS WHAT YOU THINK ABOUT WHAT YOU THINK!

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Don
« Reply #1 on: December 24, 2003, 03:05:55 pm »
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
« Last Edit: December 24, 2003, 03:15:56 pm by Don Ferguson »
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Don
« Reply #2 on: December 24, 2003, 03:13:57 pm »
P.S. to the above posting:

There is an even simpler way that doesn't use the "flag" variable.  You could just say the following:

If Len(HalsTimerStatement)>3 Then GetResponse = HalsTimerStatement

However, I've found that it can be useful to establish variants that are like "on/off switches" because you sometimes find additional uses for those same variants later on, and making your intent more obvious makes the code easier to audit months later, when your original thought process is "cold."

Sincerely,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

Psych

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Don
« Reply #3 on: January 02, 2004, 05:10:52 pm »
Hi Don

Thanks for your friendly and detailed reply.

However, my main problem concerned the <AUTO>30000</AUTO> code given to us by Medeksza. I have found that if I try to shutdown windows at the time <AUTO>30000</AUTO> is sending a signal to Hal, then windows will not shutdown. I have temporarily resolved this by using a 'forced shutdown' program, which forces Hal to shutdown. Nevertheless, a more elegant solution would be to have a program which sends(whenever windows wants to shutdown)a dde command to hal telling him to terminate the <AUTO>30000</AUTO> procedure.

Since writing to you, I have read up on DDE and it seems that I need the identity of the Hal-subprogram which must receive the dde command.

An even simpler solution would be to send the commaqnd directly to Hal's text window. However, to do this the text window needs a name - and Medeksza has not provided it with one.

It is unfortunate that Medeksza did not reply to my earlier note on this topic. No doubt he is very busy.

Anyhow, thanks Don for your support. I was very interested in your comments on autism, and have found relevant literature which I will read.

Thanks again

Psych
ITS NOT WHAT YOU THINK THAT MAKES YOU HUMAN --- ITS WHAT YOU THINK ABOUT WHAT YOU THINK!

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Don
« Reply #4 on: January 03, 2004, 12:08:44 am »
Hello,

It's always good to hear from you!  I think that you are gaining some special knowledge of DDE.  If you think that any of your DDE research and understanding would be of general help and interest, please consider posting some comments on the forum.

I hope that 2004 is starting off well for you!

Sincerely,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Don
« Reply #5 on: January 06, 2004, 05:36:34 pm »
Here is the information you need to write a DDE app in VB

Application Name: HalAssistant
EXE Name: HalAsst
Link Topic: HalCommand
Form Name: frmRightClick

When the LinkExecute event occurs it runs the new HalCommand function detailed here: http://www.zabaware.com/forum/topic.asp?TOPIC_ID=996
Robert Medeksza

Psych

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Don
« Reply #6 on: January 07, 2004, 05:25:18 am »
Thanks Mr Medeksza

I'll post my subsequent developments in the near future

Regards - Psych
ITS NOT WHAT YOU THINK THAT MAKES YOU HUMAN --- ITS WHAT YOU THINK ABOUT WHAT YOU THINK!