Announcement

Collapse
No announcement yet.

Trying top read incoming e-mail using vb script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying top read incoming e-mail using vb script

    I am getting the following error:
    Running script, script run or compile error in file: C:/Program Files (x86)/HomeSeer HS3/scripts/reademail.vbs1006:Expected ')' in line 1 More info: Expected ')
    The following is my event and script :
    Click image for larger version  Name:	script.JPG Views:	0 Size:	116.7 KB ID:	1371366
    Any thoughts on what I am messing up?

    Thanks

    Will

  • #2
    I typically use byval in front of parm in line 1. This is then passed on the stack. I also put NONE as the parameter to keep a null out of the stack. That or I would remove the "parm as object" in line 1 as you are not passing parameters. I would also set "dim index As Integer" and "dim subject, body As String". I believe in explicit typing of variables.

    Comment


    • #3
      Thank you for the response. Still get the same error.

      Click image for larger version

Name:	pic2.JPG
Views:	25
Size:	57.5 KB
ID:	1371449

      Comment


      • #4
        Change the file extension to .vb instead of .vbs. .vb is for vb.net based scripts and .vbs and .txt are for vbscript based scripts.
        HS 3.0.0.548: 1990 Devices 1172 Events
        Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

        Comment


        • #5
          Thank you. Changed file extension. Now getting:
          ompiling script C:\Program Files (x86)\HomeSeer HS3\scripts\reademail.vb: Identifier expected.
          Mar-20 13:57:07 Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\reademail.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.

          Comment


          • #6
            Change the first line to:

            Code:
            Sub Main(ByVal Parms As String)
            If you're still getting errors, then please post the errors and your script within the scripting tags that the forum posts have available, rather than a screenshot.

            HS 3.0.0.548: 1990 Devices 1172 Events
            Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

            Comment


            • #7
              Thank you all works great

              Comment

              Working...
              X