| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | RE: [ECS] Question Mark Michael David Sun, 6 Sep 1998 11:52:17 -0400 |
Hi Guys! Here's how I do this: Item defs: |Item:Caller ID Name Type:Caller-ID-Name Acc:User/User | Initial State:(None) Backup:No | Name :? |Item:Caller ID Number Type:Caller-ID-Number Acc:User/User | Initial State:(None) Backup:No | Number :? |Item:Caller Name Type:Text Acc:User/User | Initial State:(None) Backup:No | Text : |Item:Caller Number Type:Text Acc:User/User | Initial State:(None) Backup:No | Text : |Item:"?" Type:Text Acc:User/User | Initial State:Idle Backup:Yes | Text :? |Item:Text to Log Type:Text Acc:User/User | Initial State:(None) Backup:No | Text : |Item:"at" Type:Text Acc:User/User | Initial State:(None) Backup:No | Text :at Excerpt from my Phone System event: | BEGINIF Caller ID Interface Is Not Now None | Do Caller Name T1<-T1 Caller ID Name | Do Caller Number T1<-T1 Caller ID Number Excerpt from my Caller ID event: | If Caller Name Is/T1 "?" | Then Text to Log T1/A<-T1 Caller Number | Else Text to Log T1/A<-T1 Caller Name | Then Text to Log Set <Space> | Then Text to Log T1/A<-T1 "at" | Then Text to Log Set <Space> | Then Text to Log T1/A<-T1 Caller Number | Do Text to Log Set Log Hope this helps. Cheers! Michael David michael@michaeldavid.com -----Original Message----- From: Ingo Dean [mailto:Ingo_Dean@mentorg.com] Sent: Saturday, September 05, 1998 11:46 PM To: ecs-list@vancouver.ml.org Subject: RE: [ECS] Question Mark > From: Dan Carrington [mailto:dc_grafx@microworks.net] > I am playing with the caller ID settup that was shown recently for a way > to replace the caller id name with the number is name was not available > but the event lines need to check for the question mark. ECS will not > let me type a ? anywhere!!! How do I type a ?? What you have to do is to exit ECS, and hand-code in a text-item with the value "?". There doesn't seem to be any other way. Then, I also couldn't just compare my Caller-ID-Name item directly to my Question-Mark item. It just wouldn't work... but if you clear a temp text item (Text-B below) and then use the Set/Char operator to copy the first character from Caller-IC-Name to it, you can then do a Is/T1 comparison. I don't know why I had to do it this way... but then again, I'm pretty new at ECS. My code is below: |Item:Question Mark Type:Text Acc:User/User | Initial State:(None) Backup:No | Text :? |Item:Text-B Type:Text Acc:User/User | Initial State:(None) Backup:No | Text :T |Item:Empty Text Item Type:Text Acc:User/User | Initial State:(None) Backup:No | Text : | BEGINIF Caller-ID-C Is Not Now None | Do Text-A T1<-T1 MSG:Call From | Do Text-A Set <Space> | Do Text-B T1<-T1 Empty Text Item | Do Text-B Set/Char Caller-ID-Name | | Do Text-A T1<-T1 MSG:Call From | Do Text-A Set <Space> | | If Text-B Is/T1 Question Mark | Then Text-A T1/A<-T1 Caller-ID-Number | Else Text-A T1/A<-T1 Caller-ID-Name | | Do Text-A Set Speak | | If Text-B Is/T1 Question Mark | Else Text-A Set <Space> | Then Text-A Set a | Then Text-A Set t | Then Text-A Set <Space> | Then Text-A T1/A<-T1 Caller-ID-Number | | Do Text-A Set Log | | ENDIF