Announcement

Collapse
No announcement yet.

Passing keystrokes to Media Center 2005

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

    Passing keystrokes to Media Center 2005

    i downloaded that little applet (wherezt) and it said I had several applications running with the title of Media Center. while Media Center allows direct launching within several of its sections (i.e. you can have it launch directly into MyTV instead of going through the top menu) it does not allow for direct launching of its Play DVD menu item.

    Media Center also allows you to play a DVD from its remote and from keystrokes, but only after the program has launched. What I (and others) am trying to do is have HomeSeer launch Media Center and then send the keystrokes to Play DVD (Ctrl/Shft/M).

    Here is the script I've put together from the help file and posts I've found elsewhere on here:

    sub main()

    dim I
    i=hs.launch("C:\WINDOWS\eHome\ehshell.exe","")
    hs.waitsecs 3
    hs.keys "","Media Center",1
    hs.waitsecs 3
    hs.keys "^(+m)","Media Center",1

    end sub

    It launches Media Center fine but never accesses the Play DVD button. I've checked the logs and there are no errors. I've substituted other keystrokes {enter} to see if Media Center would respond to those, same result.

    I found a page where it talks about MCE Keyboard shortcuts and it says something about Hip Command (Keystroke or SendMessage Commands) for Ctrl/Shft/M is ^!m, not ^+m.... but I have no idea if those are even talking about the same thing. I tried it both ways and neither work.

    Anyone have any pointers?

    #2
    AutoIt3 as an alternative?

    There is an app called AutoIt3 that I have found to have excellent window handling and key sending functions. It can be ran directly from HS scripts or compiled into standalone exe's to run from anywhere. It will call windows, wait for them to become active and then send the keys, this really improves your timing abilities.

    I can forward you the URL and further info if you are interested.

    Later, Terry

    Comment


      #3
      I would use the MCE controller plugin. It allows you to simulate any key on the MCE remote, and is very easy to implement:

      http://www.kindel.com/Default.aspx?tabid=25

      Not sure if AutoItv3 will work since Girder has issues targetting the MCE app as well.

      PS AutoIt is a really cool program for sure, I just finished writing a new script today, and compiled it into an exe allowing me to do remote ftp backups.
      HSPRO 2.4 (ESXi 4.1) | my.Alert NEW | my.Trigger | HSTouch | ACRF2 | UltraM1G | BLWeather | BLLan | Rover
      (aka xplosiv)
      Do You Cocoon? Home Automation News, Tutorials, Reviews, Forums & Chat

      Comment


        #4
        Cool, good to know.

        Comment


          #5
          Look at Christian's Message Server, highly recommended here.

          http://board.homeseer.com/forumdisplay.php?f=688


          ~Bill

          Comment


            #6
            cool... thanks guys, i'll look into those.

            Comment


              #7
              Do you have a sample code snippet of how to use MCE Controller from a HS 2.0 script?

              Electron,

              do you have a sample code snippet of how to use MCE Controller from within a HS 2.0 Script?

              Thanks!

              Ken

              Comment


                #8
                See this thread for example of how I have mine setup.

                http://forums.homeseer.com/showthrea...574#post645574

                Comment

                Working...
                X