Hi Jay,
What you request can already be done in Ascendis Caller ID using advanced actions. For example:
Code: Select all
// LANGUAGE=DWS
// The following function is built into DWS scripting:
//
// function DayOfWeek(Date: TDateTime): Integer;
// DayOfWeek returns the day of the week of the specified date as an
// integer between 1 and 7, where Sunday is the first day of the week and
// Saturday is the seventh.
// send mail to cell phone on M-F, 8 am - 5:30 pm
if (DayOfWeek(Now) > 1) and (DayOfWeek(Now) < 7) and
(Time > StrToTime('8 am')) and (Time < StrToTime('5:30 pm')) then
begin
SendMail('myemail@myisp.com', 'mycellphone@mycellularprovider.com',
'Call from ' + CallInfo.Name + ' at ' + CallInfo.Number,
CallInfo.DateTimeStr);
end
// otherwise announce the caller
else
begin
Speak('Call from ' + CallInfo.Name + ' at ' + CallInfo.Number);
end;
You should put the above script into a new category to make it easy to use:
1) Copy the above code section to the clipboard
2) In Ascendis Caller ID, click the "Categories" tab
3) Create a new category (right-click in the Categories grid, and select "New Category")
4) Name the category something meaningful, like "EmailOrAnnounce" (type the name into the "Category Name" box)
5) Set the "Action" to "Advanced"
6) Right-click in the script box and select "Paste"
7) Click OK to close the category window and save the changes
You can test the action (to make sure it works as desired) by right-clicking on the new category in the category list and choosing "Test Action".
Now you need to change the desired callers to use the new category:
1) Click the "Callers" tab to show the callers
2) Right-click on the desired caller, and select "Edit Caller"
3) Change the "Category" to the new category you created above
4) Make sure the "Action" is set to "Category"
5) Click OK to close the window and save the changes
You will have to change the from and to email addresses in the "SendMail" command appropriately. You can also easily change the "Speak" command to say whatever you wish. If you need help with either of these changes, just let me know what you're trying to do.
I admit that most users will not be able to come up with the above script and would prefer an easy way to do it. However, adding conditionals to the "Easy" action interface will make it more complicated and less approachable. Hopefully advanced scripts will be sufficient, at least until we can implement an easy-yet-advanced "Easy" action. In the interim, I'm happy to write custom advanced scripts for users who need them!
Finest regards,
Bill Root
Ascendis Software