Apparently only the most recently initiated script is eligible to execute. If script Try1 is executing, and calls hs.WaitSecs or hs.WaitEvents, and script Try2 gets started during that time, then Try1 will not get a chance to execute again until Try2 ends (despite the fact that Try2 calls the Wait methods. Is this a characteristic of script processing in general? It seems wrong.
This behavior is with HomeSeer 1.5.0.2 build 27 (and earlier) on WindowsXP.
Here is the script for Try1 (2 and 3 similar):
sub main()
dim mytime
dim tries
hs.WriteLog "Begin try1", 0
for tries = 1 to 4
hs.WriteLog "Here is try1", tries
hs.WaitSecs 4
hs.WaitEvents
next
hs.WriteLog "End of try1", 99
end sub
And here is the log, when the three scripts are executed from separate manual HS events:
2/10/2002 9:09:02 PM~!~Event Trigger~!~Trigger from menu (Try1)
2/10/2002 9:09:02 PM~!~Begin try1~!~0
2/10/2002 9:09:02 PM~!~Here is try1~!~1
2/10/2002 9:09:07 PM~!~Event Trigger~!~Trigger from menu (Try2)
2/10/2002 9:09:07 PM~!~Begin try2~!~0
2/10/2002 9:09:07 PM~!~Here is try2~!~1
2/10/2002 9:09:13 PM~!~Event Trigger~!~Trigger from menu (Try3)
2/10/2002 9:09:13 PM~!~Begin try3~!~0
2/10/2002 9:09:13 PM~!~Here is try3~!~1
2/10/2002 9:09:17 PM~!~Here is try3~!~2
2/10/2002 9:09:21 PM~!~Here is try3~!~3
2/10/2002 9:09:25 PM~!~Here is try3~!~4
2/10/2002 9:09:29 PM~!~End of try3~!~99
2/10/2002 9:09:29 PM~!~Here is try2~!~2
2/10/2002 9:09:33 PM~!~Here is try2~!~3
2/10/2002 9:09:37 PM~!~Here is try2~!~4
2/10/2002 9:09:41 PM~!~End of try2~!~99
2/10/2002 9:09:41 PM~!~Here is try1~!~2
2/10/2002 9:09:45 PM~!~Here is try1~!~3
2/10/2002 9:09:49 PM~!~Here is try1~!~4
2/10/2002 9:09:53 PM~!~End of try1~!~99
This behavior is with HomeSeer 1.5.0.2 build 27 (and earlier) on WindowsXP.
Here is the script for Try1 (2 and 3 similar):
sub main()
dim mytime
dim tries
hs.WriteLog "Begin try1", 0
for tries = 1 to 4
hs.WriteLog "Here is try1", tries
hs.WaitSecs 4
hs.WaitEvents
next
hs.WriteLog "End of try1", 99
end sub
And here is the log, when the three scripts are executed from separate manual HS events:
2/10/2002 9:09:02 PM~!~Event Trigger~!~Trigger from menu (Try1)
2/10/2002 9:09:02 PM~!~Begin try1~!~0
2/10/2002 9:09:02 PM~!~Here is try1~!~1
2/10/2002 9:09:07 PM~!~Event Trigger~!~Trigger from menu (Try2)
2/10/2002 9:09:07 PM~!~Begin try2~!~0
2/10/2002 9:09:07 PM~!~Here is try2~!~1
2/10/2002 9:09:13 PM~!~Event Trigger~!~Trigger from menu (Try3)
2/10/2002 9:09:13 PM~!~Begin try3~!~0
2/10/2002 9:09:13 PM~!~Here is try3~!~1
2/10/2002 9:09:17 PM~!~Here is try3~!~2
2/10/2002 9:09:21 PM~!~Here is try3~!~3
2/10/2002 9:09:25 PM~!~Here is try3~!~4
2/10/2002 9:09:29 PM~!~End of try3~!~99
2/10/2002 9:09:29 PM~!~Here is try2~!~2
2/10/2002 9:09:33 PM~!~Here is try2~!~3
2/10/2002 9:09:37 PM~!~Here is try2~!~4
2/10/2002 9:09:41 PM~!~End of try2~!~99
2/10/2002 9:09:41 PM~!~Here is try1~!~2
2/10/2002 9:09:45 PM~!~Here is try1~!~3
2/10/2002 9:09:49 PM~!~Here is try1~!~4
2/10/2002 9:09:53 PM~!~End of try1~!~99
Comment