ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
RE: [ECS] DDE from VB
Doug Storey
Fri, 17 Mar 2000 16:56:45 -0600
Fri, 17 Mar 2000 16:56:45 -0600
Ok, its done. I have two zip files the first is an install pkg. it is 1.97
meg. A bit too much to ask someone to put on their FTP site. The second is
the source files 8.43KB.
attached is the readme file. Read it and then if you want either of the
above zips I will mail them to you.


-----Original Message-----
From: Martin Terry [mailto:Martin.Terry@mail.tribnet.com]
Sent: Saturday, March 11, 2000 11:50 AM
To: 'ecs-list@netbloc.com'
Subject: RE: [ECS] DDE from VB


Why not post the code, of if it's too lengthy, post it to the ftp site? I'm
sure plenty of people would be interested.

-----Original Message-----
From: Doug Storey [mailto:dastorey@swbell.net]
Sent: Saturday, March 11, 2000 6:36 AM
To: ecs-list@netbloc.com
Subject: RE: [ECS] DDE from VB


Sure - you want it as is or when its done.  Its a calendar/reminder program
that when executed from the startup menu or a shortcut on the desktop brings
up an input form. Birthdays, Wedding Aniversarys, One time reminders,
Trivia, and other are the catagories.
you fill in the date of the event and a reminder string.  When ecs executes
this same executable with a numeric argument it goes through the data base
and creates an a file for ecs to speak. The program figures out how many
reminders for the day and puts in the proper sentence stucture. How old
someone is what day they were born on etc. The end result is a file that
makes it sound like the system has more intelect than it does. What the DDE
was for was to tell ECS rather or not to go after the file (could have done
that other ways but I wanted to learn how).  Email me direct and we will
figure out how to get it to you.

-----Original Message-----
From: Don Stephens [mailto:donstephens@101freeway.com]
Sent: Friday, March 10, 2000 8:30 PM
To: ecs-list@netbloc.com
Subject: Re: [ECS] DDE from VB


Doug:

Would you mind sharing your code?

Don
----- Original Message -----
From: "Doug Storey" <dastorey@swbell.net>
To: <ecs-list@netbloc.com>
Sent: Friday, March 10, 2000 2:03 PM
Subject: RE: [ECS] DDE from VB


> Thanks Dan & Don
> I am using the following and it works.
>
> Form1.Text1.LinkTopic = "PGM->ECS|Any"
> Form1.Text1.LinkMode = 2
> Form1.Text1.LinkItem = "I,reminder,,SET,False"
> Form1.Text1.LinkRequest
> Unload Form1
> Set Form1 = Nothing
>
> Now if I could just find my memory leaks I would feel like one of the big
> boys. But that has nothing to do with ECS
>
> Thanks again
> Doug
>
> -----Original Message-----
> From: Dan Hoehnen [mailto:dhoehnen@infinet.com]
> Sent: Friday, March 10, 2000 9:32 AM
> To: ecs-list@netbloc.com
> Subject: RE: [ECS] DDE from VB
>
>
> Here is how ACE communicates with ECS.
>
> opening the DDE link:
>
>     txtECSDDE.LinkTopic = "PGM->ECS|Any"
>     txtECSDDE.LinkMode = 2 'manual dde link
>     SendCommandToECS ("S,ace server") 'tell ecs what name to use to
connect
> to ACE
>     SendCommandToECS ("C," & ECSClientID) 'tell ecs which DDE channel to
use
>
> The 3rd and 4th lines above are needed so ECS can send data back to ACE
> (your program). You may not need them for what you are doing.  ECSClientID
> is either A or B or C or D, depending on which of the 4 DDE channels you
> want ECS to use.  The S and C commands are documented in ddecln.c in your
> ECS folder.
>
> Sending data:
>
>     txtECSDDE.LinkItem = ecsmsg
>     txtECSDDE.LinkRequest
>
> You are executing the LinkRequest method before setting the LinkItem.  You
> should reverse the order to be like mine.
>
> You are also missing a comma in your I command.  You need 2 commas before
> the SET, like this:
>
>   Form1.Text1.LinkItem = "I,reminder,, SET, 0"
>
> I also use "SET" instead of "set" in all of my commands to ECS.  But, I
> don't know if case matters or not.  Case DOES MATTER in the item name.
>
> Try both "0" and "False" and see which works (I think you have already
done
> this).
>
> I hope this helps.
>
> Dan
>
>
> > I am trying to use DDE from VB. I want to set a true/false type
> > item in ecs.
> > My VB statements are.
> >
> > Form1.Text1.LinkTopic = "PGM->ECS|Any"
> > Form1.Text1.LinkMode = 2
> > Form1.Text1.LinkRequest
> > Form1.Text1.LinkItem = "I,reminder, set, 0"
> >
> > The link is established.  However I am not seting the state to 0 or
false
> > and the link is staying up. Can anyone assist with my programing
> > education.
> >
> > Tks Doug
> >
>
>


Calforecs is a Visual Basic program that maintains a database (caldat.txt) which
holds information about calendar events. It produces a file for ECS to speak (calspk.txt)

When Calforecs is executed from the start menu or a shortcut on the desktop a form is

displayed with the following fields. 
Function:
                Functions are Add - Display - Modify - Delete 
Event Type:
                Categories are Birthday - Wedding Anniversary - One time reminder -
Other 
                and Trivia.
Event Date:
	        Date format is 01/01/2000 This is the actual date the event happened or will
                happen The Form will not allow Future dates for Birthday - Wedding Anniversary
                Other - Trivia
	        It will not allow past dates for One time reminder.
Event Name:
                Event name is the basic speak string (you will have to play with this
one)
Reminder String:
	        The reminder String is in the Format 1,2,8,29 this tells the program what days
                you want the reminder to occur on. 1 is the day of - 2 the day before
- 8 a 
                week before etc.
Pronoun:
                Pronouns allowed are He - She - They - it . This field is used to allow
the 
                program to know the proper pronoun to use when preparing the speak file.
Submit:
		Effects the current function when needed
Close:
		Closes the program

When Calforecs is executed with a numeric argument of 1 through 364 (I use 30).  This
tells 
the program how many days of data to process. This argument should be the largest number
you
set in the reminder string above. It reads information from the database and arranges
it 
adding conjunctions etc forming sentences that are speakable by TTS. It writes this
to a file
called (calspk.txt). Then a flag is set in an ECS item called reminder. The ECS item
is  a
True/False/Unknown type. It also removes One time reminders older than today.

The install will place the executable (calforecs.exe) in the C:\program files\ecs directory.
I have not tested its use if ECS is installed in another directory. The caldat.txt and

calspk.txt are created in the same directory. You must invoke the form  and Add at least
one
entry before running from ECS. 

In ECS you create Four items and Two events or event entry’s into existing events.
Items:

Item:reminder			Type:True/False/Unknown		Acc:Virtual/User/User
	Initial State:True					Backup:No

Item:calforecs text file	Type:Text			Acc:User/User
	Initial State:(none)					Backup:No
	Text         :@calspk.txt

Item:calforecs			Type:Text			Acc:User/User
	Initial State:(none)					Backup:No
	Text         :calforecs 30

Item:calforecs error		Type:Text			Acc:User/User
	Initial State:(none)					Backup:No
	Text         :Your weenie calendar program did not run Doug

Events or event entries:
If	reminder		Is		Unknown
Then	calforecs error		Set		Speak->VC
If	reminder		Is		True
Then	calforecs text file	Set		Speak->VC
Note: I put this code in Marks Alarm-Clock event in the section after BEGINIF Sign Of
Life
Is True

If	Time			Is Now		12:01 AM
Then	reminder                Set             Unknown
Then	calforecs		Set		Execute/NW
Note: I put this code in my daily do event it can go about anywhere

Here is a sample database:
"Birthday","Glenda's birthday","03/16/1943","1,2,3,8","She"
"Birthday","cleta's birthday","03/17/1935","1,2,3,8","She"
"Birthday","camdin's birthday","03/17/1984","1,2,3,8","She"
"Birthday","grandma's birthday","03/18/1912","1,2,3,8","She"
"Birthday","dougs's birthday","03/19/1951","1,2,3,4,5,8","He"
"Birthday","Chris's birthday","03/18/1980","1,2,3,4,8","He"
"Birthday","janelle's birthday","09/19/1984","1,2,3,4,5,8","She"
"Birthday","janie's birthday","03/20/1937","1,2,3,4,5,6,7,8","She"
"Birthday","Kenny's birthday","03/24/1943","1,3,8","He"
"Birthday","curt's birthday ","03/21/1955","1,2,3,8,9,10,11,12,13,14","He"
"Birthday","moneisa's birthday","07/22/1955","1,2,3,8","She"
"Birthday","Deb's birthday","08/03/1953","1,2,3,8","She"
"Birthday","tressa's birthday","12/02/1952","1,2,3,8","She"
"Birthday","Renae's birthday","08/01/1967","1,8","She"
"Wedding Anniversary","Mom & Dad Storey's Anniversary","03/16/1949","1,2,3,8","They"
"Wedding Anniversary","Tressa and Lee's Anniversary","03/17/1996","1,2,3,8","They"
"Wedding Anniversary","Moneisa and Larry's Anniversary","07/17/1989","1,2,3,4,5,8","They"
"Wedding Anniversary","Janara and Curt's Anniversary","06/03/1978","1,8","They"
"Trivia","Doug began working for South Western Bell","03/16/1975","1","He"
"One Time reminder","Dougs dental appointment at 2 PM","03/22/2000","1,2,3,4,5,6,7,8","it"

This is the calspk.txt that was created when the program was run on 03/17/2000.
"Today is  cleta's birthday, She is 65 years old and born on a Sunday ."
"Its also camdin's birthday, She is 16 years old and born on a Saturday ."
"and its Tressa and Lee's Anniversary, They are Celebrating 4 years. Thier Wedding day
was a Sunday ."
"Tomorrow is  grandma's birthday, She is 88 years old."
"Its also Chris's birthday, He is 20 years old."
"Day after tomorrow is  dougs's birthday."
"Monday is  janie's birthday."
"Wednesday is , Dougs dental appointment at 2 PM."
"a week from today is  Kenny's birthday."

I am teaching myself visual basic This is my first project so don't expect this to be
prime
time software (its not) but It seems to do what I wanted it to do.  


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.