Announcement

Collapse
No announcement yet.

Immediate Script Issue

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

  • mpride
    replied
    Originally posted by zwolfpack View Post
    It looks like you might be mixing up "immediate" and "regular" scripting. Regular VB scripts are in files in the scripts folder with a .vb extension. They have a different syntax that an immediate script, which is a single line starting with "&", and is entered right in the event action, not in a separate file. Make sure you have "Execute immediate script" checkbox checked. Click image for larger version

Name:	immediate event.PNG
Views:	22
Size:	61.5 KB
ID:	1239588
    You are correct. I was mixing that up. When I changed to Execute Immediate Script in the event I was still pointed to the vb script file. The other thing that screwed me up was the fact that the event I was disabling was still showing as being enabled. I have to refresh the page to see the status change.

    I appreciate both of you posting and trying to help me. Ill probably shoot myself in the foot a few more times before I actually understand vb scripts etc.

    Leave a comment:


  • Uncle Michael
    replied
    Originally posted by mpride View Post
    I have been running HS for years now. So far I have been able to accomplish everything I needed without using scripts. However, I think that is about to change so I thought I would try to get my feet wet with vb. I thought IO would start with disabling and enabling an event. The immediate script runs ok from the control panel. However, when I create a test event to use the script I get errors. I tried checking and unchecking the Execute Immediate Script Command with no change.

    This is the script:
    &hs.disableevent "Motion - On"
    If you continue to get the error, please post a screen shot of your event.

    Leave a comment:


  • zwolfpack
    replied
    It looks like you might be mixing up "immediate" and "regular" scripting. Regular VB scripts are in files in the scripts folder with a .vb extension. They have a different syntax that an immediate script, which is a single line starting with "&", and is entered right in the event action, not in a separate file. Make sure you have "Execute immediate script" checkbox checked. Click image for larger version

Name:	immediate event.PNG
Views:	22
Size:	61.5 KB
ID:	1239588

    Leave a comment:


  • mpride
    started a topic Immediate Script Issue

    Immediate Script Issue

    I have been running HS for years now. So far I have been able to accomplish everything I needed without using scripts. However, I think that is about to change so I thought I would try to get my feet wet with vb. I thought IO would start with disabling and enabling an event. The immediate script runs ok from the control panel. However, when I create a test event to use the script I get errors. I tried checking and unchecking the Execute Immediate Script Command with no change.

    This is the script:
    &hs.disableevent "Motion - On"

    These are the 2 error messages:
    Aug-11 9:32:21 PM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\Disable Motion On.vb: Syntax error.
    Aug-11 9:32:21 PM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\Disable Motion On.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.

    Any help would be appreciated. I cant believe I'm having trouble getting stated.

    ************************************************************ ************************************************************ *************************************************
    Current Date/Time: 8/11/2018 9:41:17 PM
    HomeSeer Version: HS3 Standard Edition 3.0.0.425
    Operating System: Microsoft Windows 10 Pro - Work Station
    System Uptime: 0 Days 5 Hours 53 Minutes 50 Seconds
    Number of Devices: 96
    Number of Events: 58
    Available Threads: 1200
    HSTouch Enabled: False
    Event Threads: 0
    Event Trigger Eval Queue: 0
    Event Trigger Priority Eval Queue: 0
    Device Exec Queue: 0
    HSTouch Event Queue: 0
    Email Send Queue: 0
    Anti Virus Installed: Windows Defender

    Enabled Plug-Ins
    3.0.0.8: CM15A
    3.0.6554.33094: UltraMon3
    3.0.1.190: Z-Wave
Working...
X