Over-complication of emulators turning me off to XBMC
#16
Which version of Project64 are you using? Because version 1.6.0 and 1.7.0 do not have the same command line structure : one need double quotes, the second one not.

Here is generaly how I use autoit script to close application using ESC key :

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

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

Func Terminate()
    ProcessClose ( "Project64.exe" )
    Run ( '"C:\Program Files (x86)\XBMC\XBMC.exe"' )
    Exit 0
EndFunc
Reply
#17
I am using 1.6 .. I think 1.7 is only available to a special group of users (or anyone who just torrents it, I guess).

Is this example using 1.6 or 1.7?
Reply
#18
(2012-08-01, 15:35)JTG2003 Wrote: I am using 1.6 .. I think 1.7 is only available to a special group of users (or anyone who just torrents it, I guess).

Is this example using 1.6 or 1.7?
Here is the working autoit script for version 1.6 of Project64 :

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

If $CmdLine[0] == 1 Then
    ProcessClose ( "XBMC.exe" )
    Run ( '"C:\Program Files (x86)\Project64 1.6\Project64.exe" ' & $CmdLine[1], "C:\Program Files (x86)\Project64 1.6" )
    While 1
        Sleep(100)
    WEnd
EndIf

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

And here is the corresponding advanced launcher configuration :

Arguments : "%rom%"

Previous script was for version 1.7
Reply
#19
Thank you so much, I will give this a shot when I get out of work and post back with the results. If this works, I am going to be a very happy man.
Reply
#20
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!
Reply
#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


Reply
#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.
Reply
#23
Take care that not several Project64 Launcher.exe processes run at the same time.
Reply
#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...
Reply
#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!
Reply
#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
Reply
#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
Reply
#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")

Reply
#29
JTG2003, Why not GameEx ? (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 !
Reply



Logout Mark Read Team Forum Stats Members Help
Over-complication of emulators turning me off to XBMC0
This forum uses Lukasz Tkacz MyBB addons.