Announcement
Collapse
No announcement yet.
tenScripting3 Version 3.23 Now Available
Collapse
X
-
Great Product..
tenholde,
Thanks, much for this great development tool. I cant image HS scripting without it.
Since I have always had trouble with upgrades; probably a factor of my advanced age, I though I would pass along my lessons learned from my recent upgrade to V3.24, so maybe help some others. Plus, good reference for me for next time I upgrade. Since I only do an upgrade every 2 or 3 years, I forget what I did last time.
Thanks again,
Gary
IMAGE BELOW:
-
Originally posted by Kbevo View Posttenholde,
Thanks, much for this great development tool. I cant image HS scripting without it.
Since I have always had trouble with upgrades; probably a factor of my advanced age, I though I would pass along my lessons learned from my recent upgrade to V3.24, so maybe help some others. Plus, good reference for me for next time I upgrade. Since I only do an upgrade every 2 or 3 years, I forget what I did last time.
Thanks again,
Gary
IMAGE BELOW:
However, if most would prefer to default this option to OFF, I will make this change in future distributions.
Thanks again for your comments. There is a new version available at http://tenholder.net/tenWare2/tenScr...tallation.aspx
tenholdetenholde
Comment
-
Originally posted by tenholde View PostI did not incorporate your Options Strict change because the warnings that are generated should encourage you to adhere to more strict coding requirements, such as not using implicit type conversions. While these may work most of the time, an implicit type cast can sometimes get you in trouble, and are very difficult to find when they occur.
I am going to have to do some more research to find another way to read the text file. Suggestions/pointers welcome. I simply put an "Option Strict Off" statement in that module.
However, if most would prefer to default this option to OFF, I will make this change in future distributions.
Thanks again for your comments. There is a new version available at http://tenholder.net/tenWare2/tenScr...tallation.aspx
Comment
-
Working on the https suggestion. I've been too cheap to pay for the certificate!
Also, when installing new release, be sure to view: https://youtu.be/SxXT6YWcoss
tenholdetenholde
Comment
-
Originally posted by tenholde View Post
Code:Dim strInFS As String = hs.DeviceStringByName("GDSPublicPath") & "\VWS-Data\csv\data.csv" ' File Spec to input file Dim strDvFS As String = hs.DeviceStringByName("GDSPublicPath") & "\VWS-Data\schema\VWSData.csv" ' File Spec to VWS Devices file
Apr-25 1:13:42 PM Error Compiling script C:\Homeseer_HS3Pro\scripts\GDS_VWS_Data.vb: Exception has been thrown by the target of an invocation.
And, thats all I got. No location nor any details about what the Exception was. I tried putting in a Catch statement for InnerException (System Reflection) handling but that wouldn't trap the error either. After trial and error I finally determined that for some reason the HS VB compiler did not like those statements as Public, so I moved them back to separate local definitions in both functions.
Any idea as to why they are acceptable under tenScripting and not under HS?
Thanks
Gary
Comment
-
Originally posted by tenholde View PostCould you post the beginning of the script (first 20 lines) exactly how you saved it in the HS script folder, that generated the error.tenholde
Thanks for taking a look-see.
GaryAttached Files
Comment
-
Wow! I apologize, I just found this post and realized I never responded. If I do that again, please 'bump' the posting or send me a private message/email.
Would you please send me the entire .vb file from tenScripting that contains the script so I can try exporting it and try and determine where HS is complaining.
tenholdetenholde
Comment
-
The problem with the statements is not that they are Public, but I believe the issue is using HS functions in the variable definition.
My workaround was to remove the initial value assignment from the Public declaration, and immediately assign the value when SUB Main is invoked.
Do not know how/when HS creates the hs variable, but it is apparently different than tenScripting.
You do not have to comment out those lines when you export, you can flag them to be excluded from the Export function by including the following in a comment on the statement:
@DONOTEXPORT
ie Dim aVar as string ' @DONOTEXPORT
tenholdetenholde
Comment
-
Originally posted by tenholde View Post
Do not know how/when HS creates the hs variable, but it is apparently different than tenScripting.
Yes, I agree it is apparently different. Odd this hasn't come up before though.
You do not have to comment out those lines when you export, you can flag them to be excluded from the Export function by including the following in a comment on the statement:
@DONOTEXPORT
ie Dim aVar as string ' @DONOTEXPORT
Thanks much
Gary
Comment
Comment