Announcement

Collapse
No announcement yet.

C# scripting questions

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

  • C# scripting questions

    C# scripting documentation is quite incomplete. Hours of struggling to get anything done. I have a few major issues, maybe someone knows the answer. I prefer to not use vb.

    1 - How can I figure out the failing line number for compile errors? The log shows line numbers which do not correspond to my source. Without this, coding becomes a one line at a time ordeal.

    2 - How can I include a simple class? I have some functionality which does not belong in my main script file, because I will use this common code in multiple scripts. I've added it to another file and now want to import it.

    I tried:
    // css_import xyz;
    and
    // css_import xyz.cs
    and
    //css_import C:\Program Files (x86)\HomeSeer HS3\scripts\xyz.cs;
    and
    //css_import C:/Program Files (x86)/HomeSeer HS3/scripts/xyz.cs;
    (nothing works)

    3- What is the data type of the 'hs' object, so I can pass it to code in my external class? The 'hs' object is no good in my second class. (I currently have the 2nd class pasted at the bottom of my script.)

    My understanding is that Homeseer takes my script, adds stuff to it, then compiles it. This probably explains the line number problem and the include file problem.


    Thanks,
    Mike


    Also, the forum does not appear to understand 'C#' as a search term, which makes it even harder to find info.
Working...
X