Originally posted by Roger D
View Post
Announcement
Collapse
No announcement yet.
Hs.writeLog command errors
Collapse
X
-
The PI (and Linux in general) does not support VBScript, you only have vb.net scripting, so not an issue on those systems.
-
-
-
I'm still confused because this works on my RPi HS4 4.1.16.0 system.
Roger D
Leave a comment:
-
Originally posted by rjh View Post$n works because its using the vb.net engine to run the script which supports overloaded functions. The other syntax causes the old vbscript COM engine to be used. We overloaded the writelog function and I suspect the developer who did that did not realize the limitations of vbscript. The only fix is to remove the overloaded function which might break other scripts or plugins that also use that API.
Yes, I can add a note to the docs. We are in the process or moving all the scripting docs to a new format.
Leave a comment:
-
$n works because its using the vb.net engine to run the script which supports overloaded functions. The other syntax causes the old vbscript COM engine to be used. We overloaded the writelog function and I suspect the developer who did that did not realize the limitations of vbscript. The only fix is to remove the overloaded function which might break other scripts or plugins that also use that API.
Yes, I can add a note to the docs. We are in the process or moving all the scripting docs to a new format.
Originally posted by jon00 View Post
Rich,
I don't wish to be a pain, but would you please elaborate on this? Which API are you referring to? If this is going to be the case, should not this be documented somewhere?
Just for your information, the following works in an immediate script command:
&nhs.Writelog ("WriteLog Entry", "Insert message here")
This fails:
&hs.Writelog ("WriteLog Entry", "Insert message here")
Running script(1) &hs.Writelog ("WriteLog Entry", "Insert message here"), init error: Cannot use parentheses when calling a Sub
As does:
&hs.Writelog "WriteLog Entry", "Insert message here"
Running script(2) &hs.writelog WriteLog Entry, Insert message here, init error: Syntax error
Leave a comment:
-
Originally posted by rjh View PostIf we change this now we can break plugins that are using this API. So something will need to remain broken. For Immediate scripts you can use HS.WriteLogEx.
I don't wish to be a pain, but would you please elaborate on this? Which API are you referring to? If this is going to be the case, should not this be documented somewhere?
Just for your information, the following works in an immediate script command:
&nhs.Writelog ("WriteLog Entry", "Insert message here")
This fails:
&hs.Writelog ("WriteLog Entry", "Insert message here")
Running script(1) &hs.Writelog ("WriteLog Entry", "Insert message here"), init error: Cannot use parentheses when calling a Sub
As does:
&hs.Writelog "WriteLog Entry", "Insert message here"
Running script(2) &hs.writelog WriteLog Entry, Insert message here, init error: Syntax error
Leave a comment:
-
If we change this now we can break plugins that are using this API. So something will need to remain broken. For Immediate scripts you can use HS.WriteLogEx.
Originally posted by jon00 View Post
This is an issue with an immediate script command:
&hs.writelog("WriteLog Entry", "Insert message here")
Leave a comment:
-
Originally posted by rjh View PostLooks like you are using vbscript. That is really old and will probably start to break going forward, change your script to .vb script and use the vb.net syntax or use the WriteLogEx function instead. I believe WriteLog has an issue because there are multiple definitions and vbscript does not support that.
&hs.writelog("WriteLog Entry", "Insert message here")
Leave a comment:
-
Looks like you are using vbscript. That is really old and will probably start to break going forward, change your script to .vb script and use the vb.net syntax or use the WriteLogEx function instead. I believe WriteLog has an issue because there are multiple definitions and vbscript does not support that.
Leave a comment:
-
Originally posted by Roger D View PostGreetings All,
I'm confused, is this not supposed to work in HS4?
&hs.writelog("WriteLog Entry", "Insert message here")
Thanks,
Roger D
You currently have to use:
&nhs.writelog("WriteLog Entry", "Insert message here")
rjh Rich, any idea when this will be fixed?
Leave a comment:
-
Greetings All,
I'm confused, is this not supposed to work in HS4?
&hs.writelog("WriteLog Entry", "Insert message here")
Thanks,
Roger D
Leave a comment:
Leave a comment: