Announcement

Collapse
No announcement yet.

Help with a script.

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

    Help with a script.

    I found a script in here and have modified it a bit to send the current weather alert to a device code that I use for other things as well. It's worked great for a month or more but todays alert came in all in uppercase letters. Usually the alert is not sent that way but today it was. The line I use to send the output to the device is

    PHP Code:
            hs.SetDeviceString("Z90",String.Format("{0}"strAlertTypestrAlertTitle),True
    Is there a way to convert it to lowercase before sending it to the device? Also, would that effect anything if the alert was already in lowercase?
    Marty
    ------
    XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
    Playing with HS3 a bit but it's just play at this point.

    #2
    Try:

    hs.SetDeviceString("Z90",String.Format("{0}", lcase(strAlertType), lcase(strAlertTitle)),True)
    Jon

    Comment


      #3
      Thanks jon, I shall give it a whirl.
      Marty
      ------
      XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
      Playing with HS3 a bit but it's just play at this point.

      Comment


        #4
        Originally posted by jon00 View Post
        Try:

        hs.SetDeviceString("Z90",String.Format("{0}", lcase(strAlertType), lcase(strAlertTitle)),True)

        That did the trick jon, thank you very much. I was so close, I found the lcase command, I just couldn't get it in the right place!

        Thanks again.
        Marty
        ------
        XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
        Playing with HS3 a bit but it's just play at this point.

        Comment


          #5
          You can also use:
          PHP Code:
          hs.SetDeviceString("Z90",String.Format("{0}"strAlertType.ToLowerstrAlertTitle.ToLower),True
          Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

          Comment


            #6
            Originally posted by Ultrajones View Post
            You can also use:
            PHP Code:
            hs.SetDeviceString("Z90",String.Format("{0}"strAlertType.ToLowerstrAlertTitle.ToLower),True
            No wonder I have so much trouble with scripts, there never seems to be "THE" way to do it.
            Marty
            ------
            XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
            Playing with HS3 a bit but it's just play at this point.

            Comment


              #7
              The method I showed you is the older programming style but works in both VBS and VB.NET. Ultra showed you how it is done in VB.NET exclusively.
              Jon

              Comment


                #8
                Ah, I think I understand, I think. As things evolve there are duplicated means of doing the same thing.
                Marty
                ------
                XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
                Playing with HS3 a bit but it's just play at this point.

                Comment

                Working...
                X