Announcement

Collapse
No announcement yet.

Sorry I'm lost again

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

    Sorry I'm lost again

    I want to use the below script, but am having a prob with one thing. I want it to print certain device's device strings. Like about 10 or 15 of them. How would I do that?
    Thanx
    Tim

    "sub main()

    ' set the font size for printing

    dim printer

    set printer = hs.GetPrinter

    printer.FontSize = 12

    hs.PrintOut "I am printing this to the printer"

    end sub"
    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

    #2
    You should be able to simply use
    hs.PrintOut hs.deviceString("A1")
    hs.PrintOut hs.deviceString("A2")
    etc.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Rupp, thanx it works only one prob. (hehehe) it prints a page for each device.
      I would like to tell "Emily" to print me the weather report and use the devices from PM_Weather script. Or something like that.
      Thanx
      Tim
      FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

      HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

      Comment


        #4
        How about hs.PrintOut hs.deviceString("A1"),hs.deviceString("A2")
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Nope, sorry. Now I get this error-450:Wrong number of arguments or invalid property assignment: "hs.printOut' in line 11

          sub main()

          ' set the font size for printing

          dim printer

          set printer = hs.GetPrinter

          printer.FontSize = 12

          hs.PrintOut hs.deviceString("A1"),hs.deviceString("A2")


          end sub

          Thanx
          Tim
          FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

          HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

          Comment


            #6
            I didn't even know that hs.printout existed.

            It looks like you need to put your entire "page" into a single string before calling the function. Something like this should work:
            Code:
            dim a
            a = hs.deviceString("A1") & hs.deviceString("A2")
            hs.PrintOut a
            So you could do something like this for your weather report
            Code:
            dim a
            a = "Current Temperature: " & hs.devicestring("A1") & vbcrlf
            a = a & "Predicted High: " & hs.devicestring("A2") & vbcrlf
            hs.PrintOut a

            Comment


              #7
              Smee, you got it
              Thank you
              this works now-

              sub main()

              ' set the font size for printing

              dim printer
              dim a
              dim b
              dim c
              dim d
              dim e
              dim f

              set printer = hs.GetPrinter

              a = "Current Temperature: " & hs.devicestring("w32") & vbcrlf
              b = "Current Condition: " & hs.devicestring("w31") & vbcrlf
              c = "Current Wind Speed: " & hs.devicestring("w34") & vbcrlf
              d = "Current Wind Direction: " & hs.devicestring("w36") & vbcrlf
              e = "Current Visibility: " & hs.devicestring("w42") & vbcrlf
              f = "Current Humidity: " & hs.devicestring("w33") & vbcrlf

              hs.PrintOut a & b & c & d & e & f
              printer.FontSize = 12

              end sub


              Thanx guys,
              Tim
              FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

              HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

              Comment

              Working...
              X