Announcement

Collapse
No announcement yet.

How can I replace an odd character in a string?

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

    How can I replace an odd character in a string?


    #2
    Are you trying to modify the device string or the text in the email?

    The function you are trying to use is designed to set a device value, which is a number.
    You could do something like:
    Code:
    Dim X As String = hs.DeviceString(481)
    X = Replace(X, "&", " ") 
    hs.SetDeviceString(481, X, False)
    but I'm not sure that is going to help because you may be using the device status text, which is not the same as the device string.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      Beautiful!
      That solved it.
      I was accessing the device string and yes, only really wanted to reformat it for the email, but this is perfect too.
      Much thanks - such a simple solution yet makes a great difference.

      Enjoy your weekend.

      Comment

      Working...
      X