SiOuz Wrote:http://www.gwenael.org/xbmc/index.php?ti..._shortcuts
Yeah I had already seen this link ! But I can't just select a folder for the Application, so i tried to select steam.exe, but with any sucess.
Nevertheless i have suggestion for future release :
- Get the rating of metatric (like steam when it's possible) as the section movie with imdb.
- Set a different scrapper,thumbs,fanart, for differents "Standalone" or "File launcher" not only for the addon.
But Great addon !! keep going !
I have two generic scripts that will work for you. For both of them you need sysinternals tools installed and on your path, so get this file and extract them to your windows folder.
Scripts
Sysinternals PsTools
The first one is for steam games but won't group them, they'll all be on the root menu:
Quote:@echo off
REM *****************************************************************************************************
REM Usage:
REM call launcher_steam with 2 arguments, first argument is the steamid of the game, second argument
REM is the name of the process that must be tracked
REM ex: launcher_steam 40800 supermeatboy.exe
REM *****************************************************************************************************
REM pause XBMC
pssuspend XBMC.exe
REM start the game
start "GAME" "steam://rungameid/"%1
set process_1=%2
set ignore_result=INFO:
REM check if game has started
:1
set var=notrunning
for /f "usebackq" %%A in (`tasklist /nh /fi "imagename eq %process_1%"`) do if not %%A==%ignore_result% set var=running
echo variable %var%
timeout 1
if %var% == notrunning goto :1
REM check if game is still running
:2
set var=notrunning
for /f "usebackq" %%A in (`tasklist /nh /fi "imagename eq %process_1%"`) do if not %%A==%ignore_result% set var=running
echo variable %var%
timeout 1
if %var% == running goto :2
REM resume XBMC
pssuspend -r XBMC.exe
timeout 10
taskkill /IM steam.exe /f
All you need to do is create a REGULAR LAUNCHER for this script and in the arguments you put the steam
AppID of the game you're gonna launch (more info on that below) and the name of the process that it must track (if you don't care about this use
gameoverlayui.exe for all your games or modify the script to always track
gameoverlayui.exe) to pause/unpause XBMC. It will also forcefully close steam after the game has ended. You can comment that out by putting a REM (
REM taskkill /IM steam.exe /f)
To get
AppID first create a desktop shortcut for your Game
Then select the properties of the shortcut you just created, you only need the number not anything else
Now, if you want to group them together it's actually easier. First of all create a folder with steam desktop shortcuts (like the one we'd have created in the post above), Once you have the shortcuts create a FILE LAUNCHER and select
launcher_regular.bat, arguments would be
%rom% that is there by default and
gameoverlayui.exe, be sure to select the fil path to the path where you put all your steam shortcuts, and select the rom type to
.url.
If you're gonna be using non-steam games with this you need to create shortcuts to the games, set the rom type to
.lnk and fill the name of the process that the game creates as the second argument instead of
gameoverlayui.exe, this can be tricky as many games have one
.exe that calls a second one, you can find it using the task manager under process once the game is running. Failure to do this will result on XBMC not unpausing after game exits. You can avoid this too by commenting with REM this statement:
Quote:pssuspend XBMC.exe
to
Quote:REM pssuspend XBMC.exe
launcher_regular.bat
Quote:@echo off
REM *****************************************************************************************************
REM Usage:
REM call launcher_regular with 2 arguments, first argument is the game shortcutname, second argument
REM is the name of the process that must be tracked
REM ex: launcher_regular smb.lnk supermeatboy.exe
REM *****************************************************************************************************
REM pause XBMC
pssuspend XBMC.exe
REM start the game
start "GAME" %1.lnk
set process_1=%2
set ignore_result=INFO:
REM check if game has started
:1
set var=notrunning
for /f "usebackq" %%A in (`tasklist /nh /fi "imagename eq %process_1%"`) do if not %%A==%ignore_result% set var=running
echo variable %var%
timeout 1
if %var% == notrunning goto :1
REM check if game is still running
:2
set var=notrunning
for /f "usebackq" %%A in (`tasklist /nh /fi "imagename eq %process_1%"`) do if not %%A==%ignore_result% set var=running
echo variable %var%
timeout 1
if %var% == running goto :2
REM resume XBMC
pssuspend -r XBMC.exe
You could set it to kill steam by adding:
Quote:timeout 10
taskkill /IM steam.exe /f
At the end.
Good luck and reply here if you have any issues.