Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: tonberryhunter on April 20, 2019, 08:14:45 PM
-
I cant get .bat files to load within Attract Mode. They work within Windows fine but not Attract Mode.
Here is my Windows.cfg
# Generated by Attract-Mode v2.5.1
#
executable cmd
args /c "[romfilename]"
rompath \roms\pc
romext .bat
system PC Games
exit_hotkey Joy0 Button6+Joy0 Button7
artwork flyer \Attract Mode\scraper\Windows\flyer
artwork marquee \Attract Mode\scraper\Windows\marquee
artwork snap \Attract Mode\scraper\Windows\snap
artwork wheel \Attract Mode\scraper\Windows\wheel
Also here is a sample .bat file
@echo off
rem Run game application
cd .\Blade Strangers
start game.exe %*
-
I cant get .bat files to load within Attract Mode. They work within Windows fine but not Attract Mode.
Here is my Windows.cfg
# Generated by Attract-Mode v2.5.1
#
executable cmd
args /c "[romfilename]"
rompath \roms\pc
romext .bat
system PC Games
exit_hotkey Joy0 Button6+Joy0 Button7
artwork flyer \Attract Mode\scraper\Windows\flyer
artwork marquee \Attract Mode\scraper\Windows\marquee
artwork snap \Attract Mode\scraper\Windows\snap
artwork wheel \Attract Mode\scraper\Windows\wheel
Also here is a sample .bat file
@echo off
rem Run game application
cd .\Blade Strangers
start game.exe %*
You're using relative paths but don't define the working dirrectory in the Windows.cfg.
I would try (just to test)...
- use full paths and not relative paths (in both the Windows.cfg and *.bat file)
- define the working directory in the Windows.cfg (this could be problematic)
-
Does that exit hotkey combo actually work? I was always under the impression that you can only assign a single key and not a simultaneous set of keys. Did they add this ability in the newer nightlies or something?
-
Here they are working good inside AM with relative paths (you can adapt it to your structure):
executable cmd
args /c "[romfilename]"
rompath collections\PC Games\roms
romext .bat
system PC
nb_mode_wait 5
Sample .bat file
@echo off
set "GAMENAME=yourgame.exe"
set "GAMEPATH=\your game folder name\"
set HOME="%~dp0"
set "GAMEROOT=%~dp0%GAMEPATH%"
cd %GAMEROOT%
start "" /WAIT "%GAMEROOT%%GAMENAME%"
exit
PS: .bat files and games folders are located in the same main folder
Something like:
PC games roms. Inside you have:
Game name folder
.bat file named the same as the game name folder
a cmd.exe just in case.
Hope this helps.
-
Here they are working good inside AM with relative paths (you can adapt it to your structure):
executable cmd
args /c "[romfilename]"
rompath collections\PC Games\roms
romext .bat
system PC
nb_mode_wait 5
Sample .bat file
@echo off
set "GAMENAME=yourgame.exe"
set "GAMEPATH=\your game folder name\"
set HOME="%~dp0"
set "GAMEROOT=%~dp0%GAMEPATH%"
cd %GAMEROOT%
start "" /WAIT "%GAMEROOT%%GAMENAME%"
exit
PS: .bat files and games folders are located in the same main folder
Something like:
PC games roms. Inside you have:
Game name folder
.bat file named the same as the game name folder
a cmd.exe just in case.
Hope this helps.
This really helped allot, however I noticed something in AM if the game name or .bat name has a "space" in it the game will launch fine in AM. However if it doesn't and it one single work like gamename.bat it won't work however if the .bat file is named game name.bat or gamename .bat it works. Why does the space matter or have anything to do with AM CMD launching the game?
-
Is this a bug? Or am I just doing something wrong?
-
Unsure. Here the games launch fine if the name have a space or not. Maybe someone else can shine a light on the issue.