Announcement

Collapse
No announcement yet.

Help noob making first HS3 script?

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

  • Help noob making first HS3 script?

    I am getting an error:

    Running script, script run or compile error in file: C:/Program Files (x86)/HomeSeer HS3/scripts/rated r.txt1006:Expected ')' in line 1 More info: Expected ')'

    Running this:

    Code:
    Sub Main(ByVal parm as object)
    
        '11 is the reference ID of my MPAA Rating XMBC device
        Dim mediaType = hs.DeviceString(11)
        
        if mediaType = "Rated R" Then
            hs.TriggerEvent("MPAA Rated R popup")
        End If
    End Sub
    How embarrased can you make me in your solution to my issue?

    Thanks

  • #2
    Here is one of my scripts that does almost the same thing.

    Sub Main(ByVal parm as object)

    '12 is the reference ID of my MPAA Rating device
    Dim mpaaRating = hs.DeviceString(12)

    If mpaaRating = "Rated G" Then
    hs.Launch("C:\Program Files (x86)\PcCompanion\pcCompanion.exe", "This_movie_is_rated_G" , "", 0)
    End If

    End Sub

    the other thing that I noticed is that your file is saved with a .txt extension and it needs a .vb extension I believe

    hope this helps

    Cheers Ken
    HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

    Comment


    • #3
      Thanks Ken! Honestly I had thoughts about that, but I thought I read that you can name it either and it will work. Been reading too much i guess.

      Since I got you on the line, do you know what command to put in to make the script wait a few seconds? I'm not seeing the popup because xmbc is busy changing refresh rate of my tv for a few seconds, so it probably fires off while the screen is black.

      One other note. Have you noticed the plugin failing to respond after you stop a movie, and then play another? I have events that turn lights on/off on play/pause/stop. They all work fine until I press stop and play another movie. In the device screen, the xmbc status stays on "stopped" and I get no more triggers.

      Thanks again!
      chris

      Comment


      • #4
        Originally posted by bandook View Post
        Thanks Ken! Honestly I had thoughts about that, but I thought I read that you can name it either and it will work. Been reading too much i guess.

        Since I got you on the line, do you know what command to put in to make the script wait a few seconds? I'm not seeing the popup because xmbc is busy changing refresh rate of my tv for a few seconds, so it probably fires off while the screen is black.

        One other note. Have you noticed the plugin failing to respond after you stop a movie, and then play another? I have events that turn lights on/off on play/pause/stop. They all work fine until I press stop and play another movie. In the device screen, the xmbc status stays on "stopped" and I get no more triggers.

        Thanks again!
        chris
        I'm not a scripter at all, so I don't know how to make it wait. I simply modified the scripts a little with Spuds help. I do notice that the plugin does stop responding after stop and play another movie it stays stopped. I haven't got to much into it yet but you might want to post on spuds thread about it. I was going to as soon as I got around to it LOL.

        Cheers Ken
        HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

        Comment


        • #5
          Originally posted by kenrad View Post
          I'm not a scripter at all, so I don't know how to make it wait. I simply modified the scripts a little with Spuds help. I do notice that the plugin does stop responding after stop and play another movie it stays stopped. I haven't got to much into it yet but you might want to post on spuds thread about it. I was going to as soon as I got around to it LOL.

          Cheers Ken
          Ok thanks. I have been in contact with him. He's a very helpful dev. Just didn't want to bother him too much with noobish stuff

          I was able to get a wait command in the event rather than the script. Duh. Still having the issue with the stop/play. Guess its a bug, it is a beta after all. I'll post that issue in his thread.

          Thanks again!

          Comment

          Working...
          X