TechLife Wrote:OK, here's how I did it in Vista with a RC6 VMC remote:
I wanted to use the "Start" (Windows) button on my remote to launch XBMC. By default, this starts VMC. To get around this, do the following:
- Start the "Input Service Configuration" which is the core of IR Server Suite
- Scroll down to "Microsoft MCE" and click "Configure"
- On the "Remote" tab, check the box for "Disable Automatic Buttons"
- The service will then ask to restart to apply changes - let it.
Now, when you press the start button on the VMC remote, nothing should happen. Good...now we can make it do what we want.
- Set "Translator" to run as Administrator. If you don't, this will never work
- Open "Translator"
- Click "New" to create a new system wide action.
You will be prompted to press the button on the remote you want to assign the action to. In my case, I pressed start (button code 31730). As long as the code was accepted, you should now see the "Button Mapping" dialogue.
- Click the "Run" tab
I used the the following settings for mine, modify yours accordingly...
Description: Start XBMC
Application: C:\Program Files\XBMC\XBMC.exe
Start Folder: C:\Program Files\XBMC\
Parameters: -fs -p
Window Style: Normal
All other options unchecked
- When done, press set.
- Minimize "Translator" and press the button you chose to launch XBMC.
You can tell Translator to start with Windows by checking the box on the main Translator window but it's just going to be blocked. Of course you can always click the blocked startup programs and allow it to run every time you reboot but that's just annoying if you ask me so leave it unchecked. Create a task scheduler event that runs Translator at startup instead. If you haven't done this before, you'll find this guide handy: http://forums.slickdeals.net/showthread....&p=6509411.
Hey TechLife, thanks for the Info. Your remote configuration works great. I wanted a little more functionality from the Start button than just opening XBMC because of an issue I had with standby so I elaborated on your design. I figured others may want the same from their Start button so I thought I would share.
When I resume from standby on my HTPC the XBMC window resumes minimized. The first time this happened I pressed the Start button again which just opened a second instance of XBMC. My HTPC is not powerful enough to run two instances of XBMC so I decided to find a fix. I wrote a simple script that is called by Translator when the Start button is pressed instead of the xbmc executable. The script allows the Start button to have three functions within XBMC instead of just one.
Here are the three things the Start button can do now.
- Start XBMC from scratch
- If XBMC is running but minimized, it will activate the window
- If XBMC is running and maximized, the Start button will act as a "Home" button bringing the user back to the home screen
The script was created with AutoIt so it is very easy to modify. I compiled the script into an exe file for portability but unfortunately the script won't maximize a minimized XBMC window without first having the AutoIt script software installed. Below is the script:
If ProcessExists("xbmc.exe") Then
If WinActive("[TITLE:XBMC]") Then
Send("{HOME}")
Else
WinActivate("[TITLE:XBMC]")
EndIf
Else
ShellExecute("C:\Program Files\XBMC\XBMC.exe", "-fs -p", "C:\Program Files\XBMC", "open")
EndIf
The script first checks to see if the process xbmc.exe exists. If it does exist, it then checks to see if the XBMC titled window is active. If it is not active it will activate it. If it is active, it will send the "Home" key. If xbmc.exe is not running, the script will run it similar to how Translator runs it when you press the button. To get the home screen functionality to work, I had to edit the keymap.xml file and change the value XBMC.ActivateWindow(Home) under the keyboard heading from browser_home to home. (The button Browser_Home minimized XBMC and opened my default browser to its home page)
If you would like the same Start button functionality on your XBMC PC, follow these steps.
- Install and compile the script to an exe file.
- Install the AutoIt V3 software available from here.
- Copy the script text from above into notepad and save it as startbutton.au3 or something similar.
- Right click the startbutton.au3 file and select "Compile Script". After it finishes a file named startbutton.exe should appear in the same directory as the script.
- Copy startbutton.exe to the C:\Program Files\XBMC directory or somewhere convenient.
- Configure Translator
- Open translator, select the command that was entered earlier and click "Delete".
- Click "New", press the Start button on the remote, click the browse button next to the Application box, browse to the directory where the startbutton.exe file was saved and select it.
- Leave the defaults and select "Set" to create the code.
- Click "Ok" to close the new command dialog box and "OK" again to close Translator.
- Edit the keymap.xml file
- Browse to C:\Program Files\XBMC\system, right click the keymap.xml file and select "edit". Change the line under "Keyboard" from <browser_home>XBMC.ActivateWindow(Home)</browser_home> to read like this: <home>XBMC.ActivateWindow(Home)</home> and save the file.
- Test the remote to see if it behaves as expected.
- The Start button should now open XBMC, maximized a minimized XBMC window, and go back to the home screen.