Originally posted by Gogs
View Post
Gogs
Last nigth I ran a test, to see what would happen. I replaced the "x" with my code "Y", units codes with "89 thru 95".placed your scritp in a event and manualy, triggered it, but nothing happened. There where no error codes in the log. 89 thru 93 are birth dates, 94 and 95 are daylight savings. code 89 is 1 day of completing (actual birthday) and 90 is only 3 days aways. What should the script do when all is ok?
sub main()
for i = 89 to 95
if (left(hs.devicestring ("y" & Cstr(i)),3))="Tod" then
hs.speak hs.devicestring("y" & Cstr(i))
i=i+1
end if
if (left(hs.devicestring ("y" & Cstr(i)),3))="Tom" then
hs.speak hs.devicestring("y" & Cstr(i))
i=i+1
end if
if i>44 then
exit sub
end if
if (left(hs.devicestring ("y" & Cstr(i+1)),3))>100 then
exit sub
end if
if i=43 then
hs.speak "and, There are " & hs.devicestring("y" & Cstr(i))
exit sub
end if
if (left(hs.devicestring ("y" & Cstr(i)),2))<89 then
hs.speak "There are " & hs.devicestring("y" & Cstr(i))
end if
next
end sub
Comment