Announcement

Collapse
No announcement yet.

hs.keys question

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

    hs.keys question

    I've created a vbs file with the following hs.keys command. The first time I run the script it doesn't work but the second time I run it it does. Any ideas what I'm doing wrong ?

    set hs=createobject("Homeseer.Application")
    hs.keys "{F3}","HomeSeer",1

    #2
    Phill,
    My guess would be that the first time HomeSeer is not running and the second time it is? Is this true? If so you may have to wait for the entire HS executable to "finish" loading before issuing the hs.keys.
    -Rupp
    sigpic

    Comment


      #3
      Rupp.

      Actually Homeseer is up and running. I've tried putting multiply hs.keys commands in thinking that it might just be missing the first command but this hasn't fixed it. I didn't know if it was peculiar to just the Homeseer app. I'll try some more testing.

      Thanks.

      Comment


        #4
        Phill,
        The problem with Keys is the app you want to control has to have focus. If HS doesn't have focus it can't switch to the events view.
        -Rupp
        sigpic

        Comment


          #5
          phill,
          Try running this:
          set hs=createobject("Homeseer.Application")
          hs.keys "","HomeSeer",1
          hs.keys "{F3}","HomeSeer",1
          this will get HS focus first.
          ....JG
          HS2PRO - Ocelot, SecuIR, Secu16, Attendence Management Alarm Interface, X-10, LCD Studio VFD Display, 3 Apexis IP Cams, Custom Software Interfaces, GMQ Geiger Graphing
          HS3PRO - Testing

          Comment


            #6
            Jebus

            I tried that, but it was doing the same thing i.e it only seemed to work every other time. I think your right it's a focus thing. So I tried putting in the full title of the Window including the xml file and it now works perfectly.

            set hs=createobject("Homeseer.Application")
            hs.keys "","HomeSeer (C:\Program Files\HomeSeer\config\sample.xml)",1
            hs.keys "{F3}","HomeSeer (C:\Program Files\HomeSeer\config\sample.xml)",1

            Comment

            Working...
            X