Problem with running my script
Posted: Wed Mar 09, 2005 10:44 pm
Hi,
My script doesn't seem to execute on the last else for Saturdays and Sundays.
Basically, is my over all script look ok or need corrections?
Thanks!
JT
//LANGUAGE=DWS
// on Monday through Friday
if (DayOfWeek(Date) >= 2) and (DayOfWeek(Date) <= 6) then
if (Time > StrToTime('8 am')) and (Time < StrToTime('4 pm')) then
begin
SendMail(
// from email address
'jtsoft@tampabay.rr.com',
// recipient email address
'jeff.tomich@geac.com',
// subject
'Call from ' + CallInfo.Name + ' at ' + CallInfo.Number,
// message
'Call received on line ' + CallInfo.Line);
Speak('I am Sending Email');
end
else if (Time > StrToTime('6 pm')) or (Time < StrToTime('7 am')) then
begin
Speak('Hanging up after 6 PM');
HangUp;
end
else
begin
// on Saturday and Sunday
HangUp;
Speak('Its Saturday or Sunday and I am Hanging up');
end;
My script doesn't seem to execute on the last else for Saturdays and Sundays.
Basically, is my over all script look ok or need corrections?
Thanks!
JT
//LANGUAGE=DWS
// on Monday through Friday
if (DayOfWeek(Date) >= 2) and (DayOfWeek(Date) <= 6) then
if (Time > StrToTime('8 am')) and (Time < StrToTime('4 pm')) then
begin
SendMail(
// from email address
'jtsoft@tampabay.rr.com',
// recipient email address
'jeff.tomich@geac.com',
// subject
'Call from ' + CallInfo.Name + ' at ' + CallInfo.Number,
// message
'Call received on line ' + CallInfo.Line);
Speak('I am Sending Email');
end
else if (Time > StrToTime('6 pm')) or (Time < StrToTime('7 am')) then
begin
Speak('Hanging up after 6 PM');
HangUp;
end
else
begin
// on Saturday and Sunday
HangUp;
Speak('Its Saturday or Sunday and I am Hanging up');
end;