Announcement

Collapse
No announcement yet.

replacing "°C" by "degree" in a script

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

  • replacing "°C" by "degree" in a script

    I am working on a script to speak weather extracted from my ENVCAN plugin but I can't find a way to replace the "°C" by "degree" in a script,

    I have tried :
    ResTemp = Replace(DevTemp,chr(176)," degree ")
    ResTemp = Replace(DevTemp,"°C"," degree ")

    but the outpout is always °C anyone have a hint ?

  • #2
    Is this a device string? You really need to look at the source code as it may be constructed using html code.

    If you have my device viewer and documenter installed, it shows the source code of a device string when in advanced view. Alternatively, you can look at the source using Chrome or Firefox etc (normally right-click on the device management page) and finding the correct device.
    Jon

    Comment


    • #3
      Hi jon

      i looked at the device string with your device viewer and the résulte is « °C

      but even if I try ;

      ResTemp = Replace(DevTemp,"°C"," degree ")

      this is still not working

      Comment


      • #4
        Would you show me how you get the ResTemp string in your code?
        Jon

        Comment


        • #5
          Jon, please find attached the script i am using to extrac/replace balues from the plugin device

          thanks for your help
          Attached Files

          Comment


          • #6
            Let's take this in small steps.

            What happens if you try:

            ResTemp = Replace(DevTemp,"°","")

            Does that get rid of the degree symbol?
            Jon

            Comment


            • #7
              Got it working, I was ovewriting ResTemp further in the script...

              sorry for that and thanks a lot

              Comment

              Working...
              X