• 1
  • 347
  • 348
  • 349(current)
  • 350
  • 351
  • 453
[CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC
(2013-07-10, 12:28)Angelscry Wrote:
(2013-07-10, 12:16)n1md4 Wrote:
(2013-07-10, 03:32)Angelscry Wrote: ..Then you will have a fast, light and fully fonctionnal HTPC system based on stabilized Archlinux rolling release.

Stablised? Have you used Arch before! Wink

I think I'll use this as an excuse to rebuild XBMC on SSD, on top of a window manager..
Yes I was using it during 2-3 years. Avorted updates because missing dependencies was relatively current. Manjaro, with a 1-2 week decay on update releases is more stable.

Fair enough. It isn't quite my cup of tea. In other news, I do now have OpenBox autobooting XBMC, on an SSD - 8 secs from boot to XBMC, not too bad Smile

Thanks for all the assist, especially as it's ended up going off-topic.
HTPC RPI3 Kodi 17 (Krypton) v8.0.1 MR
Storage BPI 1x 500GB SSD UPnP server
Display Sony Bravia 32"
Hey.

How do I get back when I close a PC game?!

That`s my code:

Code:
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>


Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -hide -exit")

_GDIPlus_Startup()

$GUI_Width = @DesktopWidth  ;only with these macros other values will result in misplacement of the CD.
$GUI_Height = @DesktopHeight


$hGUI = GUICreate('MyGUI', $GUI_Width, $GUI_Height, 0, 0, $WS_POPUP)
GUICtrlCreatePic('D:\HTPC\Games\PC\screenshot\' & $CmdLine[2] & '.jpg', 0, 0, $GUI_Width, $GUI_Height)
GUISetState()

$hBmp_CD = _GDIPlus_ImageLoadFromFile('D:\HTPC\Games\PC\cartridge\' & $CmdLine[2] & '.png')
$hBmp_Gfx_CD = _GDIPlus_ImageGetGraphicsContext($hBmp_CD)

$iWidth = _GDIPlus_ImageGetWidth($hBmp_CD)
$iHeight = _GDIPlus_ImageGetHeight($hBmp_CD)
$hGUI_Gfx = _GDIPlus_GraphicsCreateFromHWND($hGUI)

$hBmp = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hBmp_Gfx_CD)
$hBmp_Gfx = _GDIPlus_ImageGetGraphicsContext($hBmp)

$hMatrix = _GDIPlus_MatrixCreate()

_GDIPlus_MatrixTranslate($hMatrix, $iWidth / 2, $iHeight / 2)

$i = 0

Do

    _GDIPlus_MatrixRotate($hMatrix, 3)
    _GDIPlus_GraphicsSetTransform($hBmp_Gfx, $hMatrix)

    ;The CD is not at the Center perfectily, therefore some cliping would occur
    _GDIPlus_GraphicsDrawImage($hBmp_Gfx, $hBmp_CD, -$iWidth / 2, -$iHeight / 2)
    _GDIPlus_GraphicsDrawImage($hGUI_Gfx, $hBmp, ($GUI_Width / 2) - ($iWidth / 2), ($GUI_Height / 2) - ($iHeight / 2))


    _GDIPlus_GraphicsClear($hBmp_Gfx, 0x0000000) ;Make the Background equal to the background of the GUI
    Sleep(5)
$i = $i + 1

Until $i = 225

;memory release
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_GraphicsDispose($hBmp_Gfx)
_GDIPlus_GraphicsDispose($hGUI_Gfx)
_GDIPlus_GraphicsDispose($hBmp_Gfx_CD)
_GDIPlus_ImageDispose($hBmp)
_GDIPlus_ImageDispose($hBmp_CD)
_GDIPlus_Shutdown()


If $CmdLine[0] == 2 Then
    GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST))
    GUISetBkColor(0x000000)
    GUISetState()
    Run(@ComSpec & " /c " & '"' & $CmdLine[1] & '"', "", @SW_HIDE)
    Run("pssuspend XBMC.exe", "", @SW_HIDE)
    While 1
            Sleep(100)
    WEnd
EndIf

    [b]ProcessWait(" ' & $CmdLine[2] & '.exe")[/b]
    Run ( 'pssuspend -r XBMC.exe')
    WinSetState("XBMC","", @SW_MAXIMIZE)
    Run("D:\HTPC\Programs\nomousy\nomousy.exe", "", @SW_HIDE)
    Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -show -exit")
    Exit 0

ProcessWait(" ' & $CmdLine[2] & '.exe")

Is that right to find the current game I play?!

Cheers.
(2013-07-14, 15:45)lokipoki Wrote: ProcessWait(" ' & $CmdLine[2] & '.exe")
Is that right to find the current game I play?!
It depend how is configurated the launcher.
Another recommendation. Blue Stacks to bring your Android gaming into ALA/XBMC.
(2013-07-14, 16:13)Angelscry Wrote:
(2013-07-14, 15:45)lokipoki Wrote: ProcessWait(" ' & $CmdLine[2] & '.exe")
Is that right to find the current game I play?!
It depend how is configurated the launcher.


My arguments:

"%rom%" "% romname%"

No shortcut and the previous code I posted.

Cheers.
(2013-07-14, 22:56)lokipoki Wrote:
(2013-07-14, 16:13)Angelscry Wrote:
(2013-07-14, 15:45)lokipoki Wrote: ProcessWait(" ' & $CmdLine[2] & '.exe")
Is that right to find the current game I play?!
It depend how is configurated the launcher.


My arguments:

"%rom%" "% romname%"

No shortcut and the previous code I posted.

Cheers.
But it is for emulators or PC games?
Code:
While 1
            Sleep(100)
    WEnd

Here you are into an infinite loop. So you will stay stuck here. How do you close or want to close your PC game?
Hey.
I want to close the games in game. Lets say I play Resident Evil 4, I return to the main screen and quit the game there. So I was thinking to use the command processwait and then continue my script which will end up in maximizing xbmc.

I hope you understand what I mean...

Cheers.
(2013-07-15, 11:21)lokipoki Wrote: Hey.
I want to close the games in game. Lets say I play Resident Evil 4, I return to the main screen and quit the game there. So I was thinking to use the command processwait and then continue my script which will end up in maximizing xbmc.

I hope you understand what I mean...

Cheers.
So remove the While loop.
(2013-07-14, 15:45)lokipoki Wrote: Hey.

How do I get back when I close a PC game?!

That`s my code:

Code:
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>


Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -hide -exit")

_GDIPlus_Startup()

$GUI_Width = @DesktopWidth  ;only with these macros other values will result in misplacement of the CD.
$GUI_Height = @DesktopHeight


$hGUI = GUICreate('MyGUI', $GUI_Width, $GUI_Height, 0, 0, $WS_POPUP)
GUICtrlCreatePic('D:\HTPC\Games\PC\screenshot\' & $CmdLine[2] & '.jpg', 0, 0, $GUI_Width, $GUI_Height)
GUISetState()

$hBmp_CD = _GDIPlus_ImageLoadFromFile('D:\HTPC\Games\PC\cartridge\' & $CmdLine[2] & '.png')
$hBmp_Gfx_CD = _GDIPlus_ImageGetGraphicsContext($hBmp_CD)

$iWidth = _GDIPlus_ImageGetWidth($hBmp_CD)
$iHeight = _GDIPlus_ImageGetHeight($hBmp_CD)
$hGUI_Gfx = _GDIPlus_GraphicsCreateFromHWND($hGUI)

$hBmp = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hBmp_Gfx_CD)
$hBmp_Gfx = _GDIPlus_ImageGetGraphicsContext($hBmp)

$hMatrix = _GDIPlus_MatrixCreate()

_GDIPlus_MatrixTranslate($hMatrix, $iWidth / 2, $iHeight / 2)

$i = 0

Do

    _GDIPlus_MatrixRotate($hMatrix, 3)
    _GDIPlus_GraphicsSetTransform($hBmp_Gfx, $hMatrix)

    ;The CD is not at the Center perfectily, therefore some cliping would occur
    _GDIPlus_GraphicsDrawImage($hBmp_Gfx, $hBmp_CD, -$iWidth / 2, -$iHeight / 2)
    _GDIPlus_GraphicsDrawImage($hGUI_Gfx, $hBmp, ($GUI_Width / 2) - ($iWidth / 2), ($GUI_Height / 2) - ($iHeight / 2))


    _GDIPlus_GraphicsClear($hBmp_Gfx, 0x0000000) ;Make the Background equal to the background of the GUI
    Sleep(5)
$i = $i + 1

Until $i = 225

;memory release
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_GraphicsDispose($hBmp_Gfx)
_GDIPlus_GraphicsDispose($hGUI_Gfx)
_GDIPlus_GraphicsDispose($hBmp_Gfx_CD)
_GDIPlus_ImageDispose($hBmp)
_GDIPlus_ImageDispose($hBmp_CD)
_GDIPlus_Shutdown()


If $CmdLine[0] == 2 Then
    GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST))
    GUISetBkColor(0x000000)
    GUISetState()
    Run(@ComSpec & " /c " & '"' & $CmdLine[1] & '"', "", @SW_HIDE)
    Run("pssuspend XBMC.exe", "", @SW_HIDE)
EndIf

    ProcessWait(" ' & $CmdLine[2] & '.exe")
    Run ( 'pssuspend -r XBMC.exe')
    WinSetState("XBMC","", @SW_MAXIMIZE)
    Run("D:\HTPC\Programs\nomousy\nomousy.exe", "", @SW_HIDE)
    Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -show -exit")
    Exit 0

I removed the while loop (refer to code above). But after I close the game the PCLauncher script is still running and XBMC doesn't maximize again. Any Idea whats wrong with my script?

Cheers.
(2013-07-16, 13:01)lokipoki Wrote:
(2013-07-14, 15:45)lokipoki Wrote: Hey.

How do I get back when I close a PC game?!

That`s my code:

Code:
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>


Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -hide -exit")

_GDIPlus_Startup()

$GUI_Width = @DesktopWidth  ;only with these macros other values will result in misplacement of the CD.
$GUI_Height = @DesktopHeight


$hGUI = GUICreate('MyGUI', $GUI_Width, $GUI_Height, 0, 0, $WS_POPUP)
GUICtrlCreatePic('D:\HTPC\Games\PC\screenshot\' & $CmdLine[2] & '.jpg', 0, 0, $GUI_Width, $GUI_Height)
GUISetState()

$hBmp_CD = _GDIPlus_ImageLoadFromFile('D:\HTPC\Games\PC\cartridge\' & $CmdLine[2] & '.png')
$hBmp_Gfx_CD = _GDIPlus_ImageGetGraphicsContext($hBmp_CD)

$iWidth = _GDIPlus_ImageGetWidth($hBmp_CD)
$iHeight = _GDIPlus_ImageGetHeight($hBmp_CD)
$hGUI_Gfx = _GDIPlus_GraphicsCreateFromHWND($hGUI)

$hBmp = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hBmp_Gfx_CD)
$hBmp_Gfx = _GDIPlus_ImageGetGraphicsContext($hBmp)

$hMatrix = _GDIPlus_MatrixCreate()

_GDIPlus_MatrixTranslate($hMatrix, $iWidth / 2, $iHeight / 2)

$i = 0

Do

    _GDIPlus_MatrixRotate($hMatrix, 3)
    _GDIPlus_GraphicsSetTransform($hBmp_Gfx, $hMatrix)

    ;The CD is not at the Center perfectily, therefore some cliping would occur
    _GDIPlus_GraphicsDrawImage($hBmp_Gfx, $hBmp_CD, -$iWidth / 2, -$iHeight / 2)
    _GDIPlus_GraphicsDrawImage($hGUI_Gfx, $hBmp, ($GUI_Width / 2) - ($iWidth / 2), ($GUI_Height / 2) - ($iHeight / 2))


    _GDIPlus_GraphicsClear($hBmp_Gfx, 0x0000000) ;Make the Background equal to the background of the GUI
    Sleep(5)
$i = $i + 1

Until $i = 225

;memory release
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_GraphicsDispose($hBmp_Gfx)
_GDIPlus_GraphicsDispose($hGUI_Gfx)
_GDIPlus_GraphicsDispose($hBmp_Gfx_CD)
_GDIPlus_ImageDispose($hBmp)
_GDIPlus_ImageDispose($hBmp_CD)
_GDIPlus_Shutdown()


If $CmdLine[0] == 2 Then
    GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST))
    GUISetBkColor(0x000000)
    GUISetState()
    Run(@ComSpec & " /c " & '"' & $CmdLine[1] & '"', "", @SW_HIDE)
    Run("pssuspend XBMC.exe", "", @SW_HIDE)
EndIf

    ProcessWait(" ' & $CmdLine[2] & '.exe")
    Run ( 'pssuspend -r XBMC.exe')
    WinSetState("XBMC","", @SW_MAXIMIZE)
    Run("D:\HTPC\Programs\nomousy\nomousy.exe", "", @SW_HIDE)
    Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -show -exit")
    Exit 0

I removed the while loop (refer to code above). But after I close the game the PCLauncher script is still running and XBMC doesn't maximize again. Any Idea whats wrong with my script?

Cheers.
Maybe it will be better to replace Run()/ProcessWait() functions by a simple RunWait(). Suspending XBMC before starting the application will be also better. Also if you change system state (pssuspend) into an If Loop it will be good the revert the state also into the loop. So you script may look something like this :

Code:
If $CmdLine[0] == 2 Then
    GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST))
    GUISetBkColor(0x000000)
    GUISetState()
    Run("pssuspend XBMC.exe", "", @SW_HIDE)
    RunWait(@ComSpec & " /c " & '"' & $CmdLine[1] & '"', "", @SW_HIDE)
    Run ( 'pssuspend -r XBMC.exe')
    WinSetState("XBMC","", @SW_MAXIMIZE)
    Run("D:\HTPC\Programs\nomousy\nomousy.exe", "", @SW_HIDE)
EndIf
Run("D:\HTPC\Programs\autotaskbarhider\TaskBarHider.exe -show -exit")
Exit 0

Concerning the fact that XBMC doesn't maximize again... that a well known old bug of XBMC under Windows. When you send the command to change the state of XBMC from minimized to maximized the state value under windows is effectively changed... but in reality XBMC still appearing minimized (and even if for Windows it is maximized). The way you can bypass it is to play with the launcher toggle windows state advanced options into Advanced Launcher and/or the window/true fullscreen mode under XBMC video settings. There is no really rules how make it works correctly.
@Angelscry,
I watch your Tele France and World Channels Addons.In the countries category,there is i24 news israel in French. I was wondering please if you could put an option for English.Thank You.
I'm having an issue, whenever I try to launch a game I get "windows cannot find ...\documents\xbmc" (whitch is where I have the shortcuts). I've started from scratch several times and have even tried different locations.
The shortcuts work from the folder in windows, but I get the error trying to run them through xbmc.

Edit: I've figured out that making the item extension lnk breaks the windows pathfinding, but changing it to something else, "ink" for example makes the shortcuts work, but I'm not able to add new items unless I change it back to the correct extension.

So when ever I want to add a new game, I have to change the extension to "lnk", then change it back to the wrong thing to actually get the shortcuts to work.
(2013-07-27, 07:36)gibbsy24 Wrote: I'm having an issue, whenever I try to launch a game I get "windows cannot find ...\documents\xbmc" (whitch is where I have the shortcuts). I've started from scratch several times and have even tried different locations.
The shortcuts work from the folder in windows, but I get the error trying to run them through xbmc.

Edit: I've figured out that making the item extension lnk breaks the windows pathfinding, but changing it to something else, "ink" for example makes the shortcuts work, but I'm not able to add new items unless I change it back to the correct extension.

So when ever I want to add a new game, I have to change the extension to "lnk", then change it back to the wrong thing to actually get the shortcuts to work.
Are you sure you have indicated the right file extension into your launchers setup : lnk (starting by a lowercase "L") and not Ink (starting by a uppercase "i")?
I probably didn't explain it too well.
When I have the extension set to lnk (L) I can add items from the folder, but the shortcuts break.
When I have the extension set to anything else (ink for example), I can't add items, but the shortcuts work.

Here's some pictures.

lnk shortcuts not working.
Image
Image

"ink" shortcuts working.
Image
Image
  • 1
  • 347
  • 348
  • 349(current)
  • 350
  • 351
  • 453

Logout Mark Read Team Forum Stats Members Help
[CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC24