2014-05-29, 10:37
Introduction
I recently made my own HTPC with the goal to fully control it using only an xbox360 game controller.
When i started with XBMC it looked quite well and was easy to use - just like a gaming console.
The only problem i had was after launched an application/game/emulator from XBMC.
Launching another application from XBMC was no problem, but closing it to return to XBMC did not work.
I then searched for a solution and found tools allowing you to use the xbox 360 guide button to send an alt+F4
or Esc or launch a program. This was very close to what i wanted but not close enough.
Having an alt+F4 sent sometimes closed XBMC itself and Esc did not work for every application i wanted to use.
So now after writing my own Application to use the guide button i want to share it with you guys in case you want to
do the same things with it as i do.
What it does
1. When XBMC is not started all you have to do it hold the guide button for 1 second, then it will rumble shortly and then
XBMC is started.
2. When XBMC is started and another window is in the foreground just hold the guide button for 1 second, then it will rumble shortly
and then the process this window belongs to is killed.
How to install
This is easy. It is just a plain exe file. Once it is launched it will not have any window or taskbar symbol.
The Application has a Tray icon which you can use to close it.
To have it launched on windows startup just put it in your autostart folder and you are fine.
More technical/in depth explanation - Geeks only
What the application does is when it starts it looks in the registiry (read only access) for the key "HKEY_CURRENT_USER\Software\XBMC" and reads the
installation path of XBMC. This is used to launch XBMC when it is not started. Since i did not find a good location to get the name of the xbmc.exe the program
always assumes that the executable of xbmc is called xbmc.exe. After it looked up the XBMC installation path it checks if there really is an xbmc.exe in this folder,
if not the function to launch XBMC is disabled.
Now for the functions that are executed in a loop (repeated until the program is closed). The program always checks for the input of 4 controllers. If a controller is not found then
it is skipped. If it finds the guide button is pressed on a controller then it will remember the time it was pressed and checks again until the first press of the button was 1 second ago and
the button is still pressed. If so then the program checks if XBMC is running. If it is not running then it rumbles for 100 milliseconds at maximum intensity on both rumble motors
and then launches XBMC.
If XBMC is running then it checks which window currently has the focus and gets the processID from it. After that it compares
the processID of the window with XBMC and if the window is not XBMC it rumbles for 100 milliseconds at maximum intensity on both rumble motors and then it kills the process.
Download locations
http://uploaded.net/file/98cbg0sp
http://www.share-online.biz/dl/7UHGJR6NSD3P
P.S.
The program is still very new, i started it yesterday evening and finished it this morning. But from what i can say
it works with wired and wireless controllers and with windows 7 and 8. I do not plan to heavily develop new features for this but
if i encounter a bug i will fix it and upload it so you can stay up to date.
Update - Version 1.0.3 - Many Thanks to 3dhubiflieger who inspired me to do these Changes.
- XGuide now has a Notification Icon with reight click function to either close XGuide or open the Setup Window
- New option to set up the time until the GuideButton reacts.
- When a Parameter is changed the Change is written to an ini file in the Same Firectory as XGuide.exe
Update - Version 1.0.2
- when a second or third or fourth controller pressed the guide button then they did not rumble -> fixed
- Now steam (steam.exe) will be ignored/not closed
Update - Version 1.0.1
- Now xGuide can only be launched once
- Now command prompts (cmd.exe) will be ignored/not closed
I recently made my own HTPC with the goal to fully control it using only an xbox360 game controller.
When i started with XBMC it looked quite well and was easy to use - just like a gaming console.
The only problem i had was after launched an application/game/emulator from XBMC.
Launching another application from XBMC was no problem, but closing it to return to XBMC did not work.
I then searched for a solution and found tools allowing you to use the xbox 360 guide button to send an alt+F4
or Esc or launch a program. This was very close to what i wanted but not close enough.
Having an alt+F4 sent sometimes closed XBMC itself and Esc did not work for every application i wanted to use.
So now after writing my own Application to use the guide button i want to share it with you guys in case you want to
do the same things with it as i do.
What it does
1. When XBMC is not started all you have to do it hold the guide button for 1 second, then it will rumble shortly and then
XBMC is started.
2. When XBMC is started and another window is in the foreground just hold the guide button for 1 second, then it will rumble shortly
and then the process this window belongs to is killed.
How to install
This is easy. It is just a plain exe file. Once it is launched it will not have any window or taskbar symbol.
The Application has a Tray icon which you can use to close it.
To have it launched on windows startup just put it in your autostart folder and you are fine.
More technical/in depth explanation - Geeks only
What the application does is when it starts it looks in the registiry (read only access) for the key "HKEY_CURRENT_USER\Software\XBMC" and reads the
installation path of XBMC. This is used to launch XBMC when it is not started. Since i did not find a good location to get the name of the xbmc.exe the program
always assumes that the executable of xbmc is called xbmc.exe. After it looked up the XBMC installation path it checks if there really is an xbmc.exe in this folder,
if not the function to launch XBMC is disabled.
Now for the functions that are executed in a loop (repeated until the program is closed). The program always checks for the input of 4 controllers. If a controller is not found then
it is skipped. If it finds the guide button is pressed on a controller then it will remember the time it was pressed and checks again until the first press of the button was 1 second ago and
the button is still pressed. If so then the program checks if XBMC is running. If it is not running then it rumbles for 100 milliseconds at maximum intensity on both rumble motors
and then launches XBMC.
If XBMC is running then it checks which window currently has the focus and gets the processID from it. After that it compares
the processID of the window with XBMC and if the window is not XBMC it rumbles for 100 milliseconds at maximum intensity on both rumble motors and then it kills the process.
Download locations
http://uploaded.net/file/98cbg0sp
http://www.share-online.biz/dl/7UHGJR6NSD3P
P.S.
The program is still very new, i started it yesterday evening and finished it this morning. But from what i can say
it works with wired and wireless controllers and with windows 7 and 8. I do not plan to heavily develop new features for this but
if i encounter a bug i will fix it and upload it so you can stay up to date.
Update - Version 1.0.3 - Many Thanks to 3dhubiflieger who inspired me to do these Changes.
- XGuide now has a Notification Icon with reight click function to either close XGuide or open the Setup Window
- New option to set up the time until the GuideButton reacts.
- When a Parameter is changed the Change is written to an ini file in the Same Firectory as XGuide.exe
Update - Version 1.0.2
- when a second or third or fourth controller pressed the guide button then they did not rumble -> fixed
- Now steam (steam.exe) will be ignored/not closed
Update - Version 1.0.1
- Now xGuide can only be launched once
- Now command prompts (cmd.exe) will be ignored/not closed