Kodi Community Forum
[CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Game Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=291)
+---- Thread: [CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC (/showthread.php?tid=85724)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - n1md4 - 2013-07-14

(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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - lokipoki - 2013-07-14

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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - Angelscry - 2013-07-14

(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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - OpFor Zulu 2 - 2013-07-14

Another recommendation. Blue Stacks to bring your Android gaming into ALA/XBMC.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - lokipoki - 2013-07-14

(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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - Angelscry - 2013-07-14

(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?


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - Angelscry - 2013-07-14

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?


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - lokipoki - 2013-07-15

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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - Angelscry - 2013-07-15

(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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - lokipoki - 2013-07-16

(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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - Angelscry - 2013-07-16

(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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - oilbag - 2013-07-20

@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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - gibbsy24 - 2013-07-27

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.


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - Angelscry - 2013-07-27

(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")?


RE: [RELEASE] Advanced Launcher - Applications Launcher Addon for XBMC - gibbsy24 - 2013-07-28

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