Over-complication of emulators turning me off to XBMC

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Angelscry Offline
Skilled Python Coder
Posts: 2,705
Joined: Sep 2010
Reputation: 37
Location: MTL, Canada
Post: #21
(2012-08-01 23:03)hewskie Wrote:  Hello Everyone,

I've been following along with this because I'm trying to do the same thing except with Zsnesw.exe

The script above works perfectly, except it won't load xbmc.exe at the end. It looks like this:

Code:
HotKeySet("{ESC}", "Terminate")

If $CmdLine[0] == 1 Then
    ProcessClose ( "xbmc.exe" )
    Run ( '"E:\SNES Project\Zsnesw151\zsnesw.exe" ' & $CmdLine[1], "E:\SNES Project\Zsnesw151\" )
    While 1
        Sleep(100)
    WEnd
EndIf

Func Terminate()
    ProcessClose ( "zsnesw.exe" )
    Run ( '"E:\program files\xbmc\xbmc.exe"' )
    Exit 0
EndFunc

My HTPC is using win xp but my main pc is win7. Would Win XP effect this at all?

I also tried the pssuspend method but got the same result. XBMC will suspend, but won't resume at the end.

Any ideas?

Thanks!
Windows XP only support 8.3 names into path format. For exemple the program files folder is identified as progra~1. So you must modify your script to something similar to this :

Code:
HotKeySet("{ESC}", "Terminate")

If $CmdLine[0] == 1 Then
    ProcessClose ( "xbmc.exe" )
    Run ( '"E:\SNES Project\Zsnesw151\zsnesw.exe" ' & $CmdLine[1], "E:\SNES Project\Zsnesw151\" )
    While 1
        Sleep(100)
    WEnd
EndIf

Func Terminate()
    ProcessClose ( "zsnesw.exe" )
    Run ( '"E:\progra~1\xbmc\xbmc.exe"' )
    Exit 0
EndFunc

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

(This post was last modified: 2012-08-01 23:33 by Angelscry.)
find quote
JTG2003 Offline
Junior Member
Posts: 41
Joined: Jul 2010
Reputation: 0
Post: #22
Ok, I just got home and tried this:



Code:
HotKeySet("{ESC}", "Terminate")

If $CmdLine[0] == 1 Then
    ProcessClose ( "XBMC.exe" )
    Run ( '"C:\xbmc media\Emulation\Nintendo 64\Project64.exe" ' & $CmdLine[1], "C:\xbmc media\Emulation\Nintendo 64\" )
    While 1
        Sleep(100)
    WEnd
EndIf

Func Terminate()
    ProcessClose ( "Project64.exe" )
    Run ( '"C:\Program Files (x86)\XBMC\XBMC.exe"' )
    Exit 0
EndFunc


Same exact result:
1) Project 64 starts up
2) Project 64 gives error, "Attempt to open file failed"
3) I can see XBMC still open in the background and pressing ESC doesn't close Project 64

I have tried using both %rom% and "%rom%" as arguments

Sad I don't get it

Edit: Side note, I am using Windows 7

Edit 2: OK... something with Advanced Launcher is taking over. I changed my script to be one line:
Code:
ProcessClose ( "notepad.exe" )
And it STILL loaded project64 and gave the error.. even though the script wasn't even pointing to it anymore. The advanced launcher has to be overriding it.

What advanced launcher setting could possibly be overriding this?

My steps for adding the launcher:

C > Create new launcher > File launcher
Select AutoIt launcher .exe (C:\XBMC Media\Emulation\Nintendo 64\Project64 Launcher.exe)
Select files path (C:\XBMC Media\Emulation\Nintendo 64\Roms\)
Set Files extentions: z64|zip|n64|v64
Application Arguments: %rom%
Title of Launcher: Nintendo 64
Select the Platform: Nintendo 64
Select Thumbnails: C:\XBMC Media\Emulation\Nintendo 64\Thumbs\
Select Fanarts: C:\XBMC Media\Emulation\Nintendo 64\Fanart\

.. I don't see anything in there that would tell it to load Project64.exe, yet somehow it knows to load it even if the script doesn't even tell it to.


Edit 3: Got it. The AutoIt .exe cant be on the same level as the emulator. When setup on different levels, it worked fine.
(This post was last modified: 2012-08-02 01:18 by JTG2003.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,705
Joined: Sep 2010
Reputation: 37
Location: MTL, Canada
Post: #23
Take care that not several Project64 Launcher.exe processes run at the same time.

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
teeedubb Offline
Member+
Posts: 746
Joined: Mar 2010
Reputation: 12
Location: Down Under
Post: #24
I use Rom Collection Browser on windows an it has a solo mode where it closes xbmc, launches the emulator and when the emulator is closed it launches xbmc. I have the fullscreen option mentioned earlier in this thread enabled in advancedsettings.XML so xbmc always reopens in fullscreen. To close the emulators I have a button mapped to my harmony remote and when this button is pressed it launches a eventghost action to close all emulators using taskkill (not all emulators use esc to exit). Works a treat...

XBMC Steam Launcher - Only available for XBMC.
find quote
JTG2003 Offline
Junior Member
Posts: 41
Joined: Jul 2010
Reputation: 0
Post: #25
Thank you for your help everyone, I am off on my way to enjoying classic games again. To anyone wanting to reference this, I used the script posted in my last post. The change that made it work was putting the AutoIt .exe file in it's own folder so it's not in the same location as the emulator. It occurs to me now that if the AutoIt .exe is named something very different from the emulator, this will work as well.

However, if the AutoIt and the emulator have a very similar name (Mine was Project64.exe and Project64 Launcher.exe), Advanced Launcher may use the wrong .exe for some reason and the script will never run.

Thanks again!
(This post was last modified: 2012-08-02 15:34 by JTG2003.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,705
Joined: Sep 2010
Reputation: 37
Location: MTL, Canada
Post: #26
(2012-08-02 15:34)JTG2003 Wrote:  However, if the AutoIt and the emulator have a very similar name (Mine was Project64.exe and Project64 Launcher.exe), Advanced Launcher may use the wrong .exe for some reason and the script will never run.
I think the fact that you are under Windows XP (with 8.3 file format) is the main cause of your problem. But grat if you have found a way to fix it... Laugh

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
JTG2003 Offline
Junior Member
Posts: 41
Joined: Jul 2010
Reputation: 0
Post: #27
(2012-08-02 15:53)Angelscry Wrote:  I think the fact that you are under Windows XP (with 8.3 file format) is the main cause of your problem. But grat if you have found a way to fix it... Laugh

I am running Windows 7, it was the other poster that had XP.

So, I have discovered one additional problem that happens about 70% of the time.

I start the emulator, it runs fine, I press "ESC" emulator closes, XBMC restores.. and my remote doesn't work. I think what is happening is XBMC is losing focus somehow. Is there any AutoIt command I can use to force XMBC to regain focus? I'd probably put a 1 second wait in there as well to ensure it's loaded.

Thanks,
Jeremy
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,705
Joined: Sep 2010
Reputation: 37
Location: MTL, Canada
Post: #28
(2012-08-06 19:10)JTG2003 Wrote:  
(2012-08-02 15:53)Angelscry Wrote:  I think the fact that you are under Windows XP (with 8.3 file format) is the main cause of your problem. But grat if you have found a way to fix it... Laugh

I am running Windows 7, it was the other poster that had XP.

So, I have discovered one additional problem that happens about 70% of the time.

I start the emulator, it runs fine, I press "ESC" emulator closes, XBMC restores.. and my remote doesn't work. I think what is happening is XBMC is losing focus somehow. Is there any AutoIt command I can use to force XMBC to regain focus? I'd probably put a 1 second wait in there as well to ensure it's loaded.

Thanks,
Jeremy
To give XBMC focus using autoit, just add :

Code:
WinActivate ("XBMC")

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
vsilvalopes Offline
Junior Member
Posts: 20
Joined: Nov 2011
Reputation: 0
Location: Brasil / Rio de Janeiro
Post: #29
JTG2003, Why not GameEx ? (http://www.gameex.com)

It's a very powerfull emulator frontend with media captibilities.
I use it on my HTPC to control my emulators.

So for the emulators, GameEx, for Media XBMC.

I've created an small app that allow me to choose wich one to start when the HTPC boots.

It's easy to configure and support almost any emulator that you throw at it.

Give a try !
find quote
Post Reply