Jump to content
  • Announcement

    The HyperSpin 2 early access beta is here!

    We’re starting the first public testing phase with Platinum Members to keep the scope manageable while we test the current feature set and begin to add more. In the future, we’ll provide a version for basic members as well.  On behalf of the entire HyperSpin team, we look forward to another exciting adventure with our community.

How can I configure XBMC to Close when Launching Hyperspin?


cbtegner

Recommended Posts

Posted

How can I configure XBMC to Close when Launching Hyperspin from XBMC? I can launch hyperspin from XBMC and play NES emulation just fine but when I play something like N64 Emulation or even SNES emulation I start to get a sound lag. Is there a way to set up my XBMC / Hyperlaunch so that when I launch Hyperspin: XBMC closes out, and when I exit Hyperspin: XBMC Launches ?? Hyperspin on its own works fine and same thing with XBMC, however when I use Hyperspin through XBMC I get the sound lag. Can somebody help me to understand what step I need to take to acheive this?

Posted

Instead of launch hyperspin from XBMC launch a .bat from hyperpsin folder

Open a new .txt document and write

taskkill /F /IM XBMC.exe

HyperSpin.exe

save it as "HYPERSPIN" and change extension to .bat (must be in the same folder of hyperpsin exe) and set HS to launch XBMC when exiting.

Probably you'll see a dos shell, to avoid it open another .txt document and write

Set WshShell = CreateObject("WScript.Shell" )

WshShell.Run chr(34) & "FULLPATH/HYPERSPIN.bat" & Chr(34), 0

Set WshShell = Nothing

Rename it to HYPERSPIN.vbs and launch it from XBMC (not tested, I use these scripts for slamtilt as you must close explorer.exe to have right colors). Just consider you MUST have no-space folder tree.

C:\frontend\HyperSpin = OK

C:\front end\HyperSpin = NO

Posted

Why do you want to do this?

I just use Executor to launch HS. Then, when I exit HS, XBMC is still up in the background

Sent from my ADR6425LVW using Tapatalk 2

Posted

Having another (heavy) program in background is not good if you are using a monocore cpu in the range of p4/atom and 1gb of ram :P

  • 4 weeks later...
Posted

XBMC uses too many resources for me , I have a duel core 1.7 and I get sound lag and slowing. I can run hyperspin alone fine, but always had problems with xbmc running at same time, im going to give the above a shot. My hyperspin folder and everything including executable is on an external drive, I have to modify the above script for G: I hope I don't mess it up

Posted

I use advanced launcher on xbmc frodo.

All scripts are written in ahk and compiled to exe's using autohotkey's compiler.

Using xbmc point to this to execute Hyperspin and close xbmc

#SingleInstance force

;----------SET PATHS----------;
XBMC := "C:\Program Files (x86)\XBMC\XBMC.exe"
HyperSpin := "C:\HyperSpin\HyperSpin.exe"
HS_SettingsINI := "C:\HyperSpin\Settings\Settings.ini"
;-----------------------------;


SetTitleMatchMode, 2
Gui, Color, 000000
Gui, -Caption +ToolWindow +AlwaysOnTop
Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%,
run, TASKKILL /F /IM explorer.exe,,Hide
sleep 500
process, close, xbmc.exe
run, %HyperSpin%,, UseErrorLevel
if ErrorLevel
{
run, %XBMC%,, UseErrorLevel
if Errorlevel = ERROR
	{
	gui, destroy
	msgbox, 0, ERROR, neither %XBMC% or %HyperSpin% was found - Make sure you have correct paths, 4
	ExitApp
	}
WinWait, XBMC, , 5
IfWinNotActive, XBMC, , WinActivate, XBMC,
WinWaitActive, XBMC, , 5
if ErrorLevel
	{
	gui, destroy
	ExitApp
	}
sleep, 5000
gui, destroy
ExitApp
}
WinWait, HyperSpin, , 3
WinWaitActive, HyperSpin
;add other programs here
IniWrite,true,%HS_SettingsINI%,XBMC,Launch
sleep, 500
gui, destroy
WinActivate, HyperSpin
ExitApp

If you don't use IdleVolumeAdjuster, or xpadder, delete the first two lines.

This script minimizes any background windows.

HyperHQ -> Main Settings -> Startup/Exit -> Startup Program. Point to the below script

Run,IdleVolumeAdjuster.exe
Run,C:\HyperSpin\Keymapper Profiles\Xpadder.exe "HyperSpin.xpadderprofile" "Hyperspin [p2].xpadderprofile" /M

WinGet, ID, List, , , Program Manager
Loop, %ID%
{
this_id := id%A_Index%
Wingettitle, title, ahk_id %this_id%
WinGetClass, class, ahk_id %this_id%
If class in Shell_TrayWnd,ThunderRT6FormDC,ThunderRT6Main,CabinetWClass,TXpadderForm,Button,AutoHotkeyGUI,TApplication
{
	; msgbox match found`n%this_id%`n%title% %class%
	Continue
}
WinMinimize, ahk_class %class%
; Sleep, 1000
}
ExitApp

If you don't use IdleVolumeAdjuster, or xpadder, delete lines 9, and 14.

If xbmc was used to launch hyperspin, hyperspin will launch xbmc. if not it will return to the desktop.

HyperHQ -> Main Settings -> Startup/Exit -> Exit Program. Point to the below script

#SingleInstance force
SetWinDelay, -1

;----------SET PATHS----------;
XBMC := "C:\Program Files (x86)\XBMC\XBMC.exe"
HS_SettingsINI := "C:\HyperSpin\Settings\Settings.ini"
;-----------------------------;

; add programs to close
Process, Close, IdleVolumeAdjuster.exe

IniRead,XLaunch,%HS_SettingsINI%,XBMC,Launch
If (XLaunch = "true") {
IniWrite,false,%HS_SettingsINI%,XBMC,Launch
Run,C:\HyperSpin\Keymapper Profiles\Xpadder.exe "C:\HyperSpin\Keymapper Profiles\XBMC\XBMC.xpadderprofile" "C:\HyperSpin\Keymapper Profiles\XBMC\XBMC [p2].xpadderprofile" /M
SetTitleMatchMode, 2
;restarting explorer.exe
	Gui, Color, 000000
	Gui, -Caption +ToolWindow +AlwaysOnTop
	Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%,
	run, C:\Windows\explorer.exe,,Hide
	WinHide ahk_class Shell_TrayWnd
	WinHide ahk_class Button
	sleep 1000
	Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%,
run, %XBMC%,, UseErrorLevel,XBMCpid
if ErrorLevel
	{
	gui, destroy
	msgbox, 0, ERROR, %XBMC% was not found - Make sure you have correct paths, 4
	ExitApp
	}
WinWait, ahk_pid %XBMCpid%, , 5
WinShow ahk_class Shell_TrayWnd
WinShow ahk_class Button
WinActivate, ahk_pid %XBMCpid%
WinWaitActive, ahk_pid %XBMCpid%, , 5
if ErrorLevel
	{
	sleep, 5000
	gui, destroy
	ExitApp
	}
sleep, 500
gui, destroy
}
ExitApp

Add this to the bottom of your "Settings.ini" or whatever ".ini" you want.

[XBMC]
Launch=false

IdleVolumeAdjuster.exe (http://www.hyperspin-fe.com/forum/showthread.php?19692-Idle-Volume-Adjuster)

Xpadder (http://xpadder.com/) $10

  • 3 months later...
Posted

Hi there, I'm having issues with advanced launcher and hyperspin, not returning to xbmc after I exit HS. I'm going to play round with hyperhq when I get home. These scripts look very helpful thanks! Just curious I'm running a i3 3225k in my htpc do you think I'll run into performance issues once I start getting into dreamcast emulation if xbmc is running in the background? Does the setting to launch a program when exiting HS able to switch focus to an already running process or will it try to launch another instance?

Posted
Hi there, I'm having issues with advanced launcher and hyperspin, not returning to xbmc after I exit HS. I'm going to play round with hyperhq when I get home. These scripts look very helpful thanks! Just curious I'm running a i3 3225k in my htpc do you think I'll run into performance issues once I start getting into dreamcast emulation if xbmc is running in the background? Does the setting to launch a program when exiting HS able to switch focus to an already running process or will it try to launch another instance?

I don't think you will run into performance issues, but remember that HyperLaunch and HyperSpin were coded to expect that there were no background windows open so I feel better about closing xbmc and restarting it than leaving it open in the background.

It will try to launch another instance, it's basically using the run command. You could have it run an ahk Script like

WinActivate, ahk_class XBMC

if you just want it to activate the window.

  • 3 months later...
Posted
I use advanced launcher on xbmc frodo.

All scripts are written in ahk and compiled to exe's using autohotkey's compiler.

Using xbmc point to this to execute Hyperspin and close xbmc

#SingleInstance force

;----------SET PATHS----------;
XBMC := "C:\Program Files (x86)\XBMC\XBMC.exe"
HyperSpin := "C:\HyperSpin\HyperSpin.exe"
HS_SettingsINI := "C:\HyperSpin\Settings\Settings.ini"
;-----------------------------;


SetTitleMatchMode, 2
Gui, Color, 000000
Gui, -Caption +ToolWindow +AlwaysOnTop
Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%,
run, TASKKILL /F /IM explorer.exe,,Hide
sleep 500
process, close, xbmc.exe
run, %HyperSpin%,, UseErrorLevel
if ErrorLevel
{
run, %XBMC%,, UseErrorLevel
if Errorlevel = ERROR
	{
	gui, destroy
	msgbox, 0, ERROR, neither %XBMC% or %HyperSpin% was found - Make sure you have correct paths, 4
	ExitApp
	}
WinWait, XBMC, , 5
IfWinNotActive, XBMC, , WinActivate, XBMC,
WinWaitActive, XBMC, , 5
if ErrorLevel
	{
	gui, destroy
	ExitApp
	}
sleep, 5000
gui, destroy
ExitApp
}
WinWait, HyperSpin, , 3
WinWaitActive, HyperSpin
;add other programs here
IniWrite,true,%HS_SettingsINI%,XBMC,Launch
sleep, 500
gui, destroy
WinActivate, HyperSpin
ExitApp

If you don't use IdleVolumeAdjuster, or xpadder, delete the first two lines.

This script minimizes any background windows.

HyperHQ -> Main Settings -> Startup/Exit -> Startup Program. Point to the below script

Run,IdleVolumeAdjuster.exe
Run,C:\HyperSpin\Keymapper Profiles\Xpadder.exe "HyperSpin.xpadderprofile" "Hyperspin [p2].xpadderprofile" /M

WinGet, ID, List, , , Program Manager
Loop, %ID%
{
this_id := id%A_Index%
Wingettitle, title, ahk_id %this_id%
WinGetClass, class, ahk_id %this_id%
If class in Shell_TrayWnd,ThunderRT6FormDC,ThunderRT6Main,CabinetWClass,TXpadderForm,Button,AutoHotkeyGUI,TApplication
{
	; msgbox match found`n%this_id%`n%title% %class%
	Continue
}
WinMinimize, ahk_class %class%
; Sleep, 1000
}
ExitApp

If you don't use IdleVolumeAdjuster, or xpadder, delete lines 9, and 14.

If xbmc was used to launch hyperspin, hyperspin will launch xbmc. if not it will return to the desktop.

HyperHQ -> Main Settings -> Startup/Exit -> Exit Program. Point to the below script

#SingleInstance force
SetWinDelay, -1

;----------SET PATHS----------;
XBMC := "C:\Program Files (x86)\XBMC\XBMC.exe"
HS_SettingsINI := "C:\HyperSpin\Settings\Settings.ini"
;-----------------------------;

; add programs to close
Process, Close, IdleVolumeAdjuster.exe

IniRead,XLaunch,%HS_SettingsINI%,XBMC,Launch
If (XLaunch = "true") {
IniWrite,false,%HS_SettingsINI%,XBMC,Launch
Run,C:\HyperSpin\Keymapper Profiles\Xpadder.exe "C:\HyperSpin\Keymapper Profiles\XBMC\XBMC.xpadderprofile" "C:\HyperSpin\Keymapper Profiles\XBMC\XBMC [p2].xpadderprofile" /M
SetTitleMatchMode, 2
;restarting explorer.exe
	Gui, Color, 000000
	Gui, -Caption +ToolWindow +AlwaysOnTop
	Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%,
	run, C:\Windows\explorer.exe,,Hide
	WinHide ahk_class Shell_TrayWnd
	WinHide ahk_class Button
	sleep 1000
	Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%,
run, %XBMC%,, UseErrorLevel,XBMCpid
if ErrorLevel
	{
	gui, destroy
	msgbox, 0, ERROR, %XBMC% was not found - Make sure you have correct paths, 4
	ExitApp
	}
WinWait, ahk_pid %XBMCpid%, , 5
WinShow ahk_class Shell_TrayWnd
WinShow ahk_class Button
WinActivate, ahk_pid %XBMCpid%
WinWaitActive, ahk_pid %XBMCpid%, , 5
if ErrorLevel
	{
	sleep, 5000
	gui, destroy
	ExitApp
	}
sleep, 500
gui, destroy
}
ExitApp

Add this to the bottom of your "Settings.ini" or whatever ".ini" you want.

[XBMC]
Launch=false

IdleVolumeAdjuster.exe (http://www.hyperspin-fe.com/forum/showthread.php?19692-Idle-Volume-Adjuster)

Xpadder (http://xpadder.com/) $10

I know this post is old but I have been searching all day and this finally did what I needed with almost no hitches! Thank you!

My only issues are these, a) it didn't minimize windows when it quit XBMC...now normally I don't have any open anyways but when I did they were all open. B) when I exit Hyperspin my taskbar pops up before it goes back into launching XBMC..not a huge deal..but might be a simple fix.

  • 9 months later...
Posted

ghutch92,

Thank you very much for these scripts!!!

I know this is an old thread but I just setup launching Hyperspin from XBMC and returning to XBMC using them. All I changed was the paths, removed the IdleVolumeAdjuster, adjusted the Xpadder Hyperspin profile and set to kill the Xpadder.exe process on return to XBMC as I don't use Xpadder to control XBMC.

Launching Hyperspin and coming back to XBMC works great!

I'm not sure if this is related to your scripts but now it looks like it takes a few seconds (maybe 5 seconds) for Xpadder to switch profile everytime a switch is needed. For example:

Start Hyperspin : Hyperspin profile works immediately

Start MAME (Xpadder switches to default profile) : I don't notice any problem here

Go to Hyperpause (Xpadder switches to Hyperlaunch profile) : Takes 5 seconds to get control

Stop Hyperpause (Xpadder switches to default profile) : I don't notice a problem

Stop MAME : (Xpadder switches to Hyperspin profile) : Takes 5 seconds to get control

Edit: The slow xpadder profile changes only happen while using these scripts.

I think the slow xpadder profile changes occur because explorer.exe is not running. If I comment out the

run, TASKKILL /F /IM explorer.exe,,Hide

line from the launch hyperspin script, everything seems to work fine.

  • 2 months later...
Posted

Ghutch...thank you for this autohotkey script.....followed your directions and works like a charm Bro!

  • 7 months later...
Posted

+1 Ghutch. Old Thread but still works like a charm. I'm not a coder, but hoping for a HL plugin for XBMC so I can use RCB / AdvLauncher, but in the meanwhile I use this.

I even added a line with nomousy.exe so it hides the windows cursor while loading hyperspin.exe :)

  • 3 months later...
Posted

how do i name these scripts do i just make an ahk file and put it in the directory i really need this but i am at lost lol im just getting into hyperspin everything works great as far as runing within xbmc just want to set mines up like this

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...