Announcement

Collapse
No announcement yet.

Type Mismatch

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

    Type Mismatch

    I'm trying to put together a script to control my new Integra PreAmp. Mostly working, but I get a type mismatch error when trying to obtain listening mode for Case "0C" (the complete data string is !1LMD0C but I parse out the last portion which defines the listening mode). Can anyone figure out what I'm doing wrong? I've tried using Cstr(pa_param) with no luck.


    Select Case pa_param
    Case "00" ' sets STEREO
    hs.SetDeviceString "P78", "STEREO", True
    Case "01" ' sets DIRECT
    hs.SetDeviceString "P78", "DIRECT", True
    Case "02" ' sets SURROUND
    hs.SetDeviceString "P78", "SURROUND", True
    Case "03" ' sets FILM
    hs.SetDeviceString "P78", "FILM", True
    Case "04" ' sets THX
    hs.SetDeviceString "P78", "THX", True
    Case "05" ' sets ACTION
    hs.SetDeviceString "P78", "ACTION", True
    Case "06" ' sets MUSICAL
    hs.SetDeviceString "P78", "MUSICAL", True
    Case "08" ' sets ORCHESTRA
    hs.SetDeviceString "P78", "ORCHESTRA", True
    Case "09" ' sets UNPLUGGED
    hs.SetDeviceString "P78", "UNPLUGGED", True
    Case "0A" ' sets STUDIO-MIX
    hs.SetDeviceString "P78", "STUDIO-MIX", True
    Case "0B" ' sets TV LOGIC
    hs.SetDeviceString "P78", "TV LOGIC", True
    Case "0C" ' sets ALL CH STEREO
    hs.SetDeviceString "P78", "ALL CH STEREO", True
    End Select
    Regards, Bob

    #2
    Does it do the same when you select 0A or 0B?

    Also, are you able to post the rest of the script? I did'nt think it mattered in VBScript as it was just of type variant, but can't remember whether if you are passing it in a parameter that changes...

    Comment


      #3
      [QUOTE=mrhappy;942366]Does it do the same when you select 0A or 0B?QUOTE]

      Thanks for the quick response. I don't know for sure. I'll try it tonight when I get home and can play around some more.
      Regards, Bob

      Comment


        #4
        Any chance this preamp might work with the onkyo-integra plugin?

        If not, you might be able to request that feature, if the protocol is well documented, it should be easy to add it in I would think.
        Joe (zimmer62)

        BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

        Comment


          #5
          Originally posted by zimmer62 View Post
          Any chance this preamp might work with the onkyo-integra plugin?

          If not, you might be able to request that feature, if the protocol is well documented, it should be easy to add it in I would think.
          It might. It's a just released model so I'm not sure the entire feature set would be supported by the plugin and the author is currently doing a rewrite. Anyway, I like to write my own (if I can).
          Regards, Bob

          Comment


            #6
            Fixed

            Found the error in my ways. Turns out I forgot the " ' " on one of my comments in the case statement just prior to the one I pasted above. Seems to be working now.

            Thanks for the help.
            Regards, Bob

            Comment

            Working...
            X