Originally posted by Wadenut
View Post
Announcement
Collapse
No announcement yet.
HS-247 - Immediate Scripts do not work
Collapse
X
-
In your case,
&hs.SetDeviceValueByRef(279,hs.DeviceValueEX(293),True)
should do it for the immediate script. Be aware though, this will create a new script file in your Temp directory.
- Likes 1
Leave a comment:
-
After converting to HS4 i'm having all my &hs scripts failing and filling the logs. Water meter tracking and few other things I would mirror the devices using something like this.
&hs.SetDeviceValueByRef 279,hs.DeviceValueEX(293),True
But that now throws an error.
What would be the correct way of convetering that to &nhs? Just adding the "n" throws other errors below.
Compiling script C:\Program Files (x86)\HomeSeer HS3\Temp\K2.vb: End of statement expected.
Compiling script C:\Program Files (x86)\HomeSeer HS3\Temp\K2.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Leave a comment:
-
All well and good, but if one isn't interested in creating a script file, then no go.
Leave a comment:
-
Originally posted by Wadenut View PostInteresting. The 'n' stands for? This is a significant difference.
Providing you start with a homeseer scripting command, you can actually run very small scripts from a single line.
Example:
Code:&nhs.version: For p as integer=1 to 10: hs.writelog("Count",p): Next
You will find the temporary scripts created in your <Homeseer root>\Temp directory and labeled KX.vb (where X is a number)
The script created for the example is shown below.
Code:Function Main(parm as object) dim result as object result=hs.version: For p as integer=1 to 10: hs.writelog("Count",p): Next return(result) End Function
Leave a comment:
-
Originally posted by Wadenut View Post18/12/2019 8:11:31 AM HomeSeer System Control Panel Immediate Script: &hs.writelog("TEST",hs.version)
18/12/2019 8:11:31 AM HomeSeer Error Running script(1) &hs.writelog("TEST",hs.version), init error: Cannot use parentheses when calling a Sub
18/12/2019 8:12:13 AM HomeSeer System Control Panel Immediate Script: &hs.writelog "TEST",hs.version
18/12/2019 8:12:13 AM HomeSeer Error Running script(2) &hs.writelog "TEST",hs.version, init error: Syntax error
1
&nhs.writelog("TEST",hs.version)
Leave a comment:
-
HS-247 - Immediate Scripts do not work
18/12/2019 8:11:31 AM HomeSeer System Control Panel Immediate Script: &hs.writelog("TEST",hs.version)
18/12/2019 8:11:31 AM HomeSeer Error Running script(1) &hs.writelog("TEST",hs.version), init error: Cannot use parentheses when calling a Sub
18/12/2019 8:12:13 AM HomeSeer System Control Panel Immediate Script: &hs.writelog "TEST",hs.version
18/12/2019 8:12:13 AM HomeSeer Error Running script(2) &hs.writelog "TEST",hs.version, init error: Syntax error
1
Tags: None
Leave a comment: