Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: [SOLVED] Need some guidance with a batch file. Help a dummy?  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

Louis Tully

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1800
  • Last login:February 13, 2015, 09:41:03 pm
[SOLVED] Need some guidance with a batch file. Help a dummy?
« on: October 24, 2014, 09:30:08 am »
.
« Last Edit: February 12, 2015, 05:51:10 pm by Louis Tully »

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 23, 2025, 06:49:54 pm
  • I break stuff...then fix it...sometimes
Re: Need some guidance with a batch file. Help a dummy?
« Reply #1 on: October 24, 2014, 11:04:35 am »
Quote
when I exit Mame after using the batch to launch it, there's an open cmd prompt window.

if you append an "exit" command after you run the game...

IE:

Code: [Select]
@echo off
cls
cd C:\MameUIv.138
MameUI32.exe roms\astdelux2.zip -skip_gameinfo -full_screen_brightness 1.0 -contrast 2.0 -beam 1.2 -d3dversion 9 -filter -use_bezels -throttle -waitvsync -effect ApertureHRES_j4
exit

the batch file should resume once the program ends... that means the exit command will run (since it's the next command) and kill the window.


rockyrocket

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 372
  • Last login:January 01, 2019, 02:13:03 pm
Re: Need some guidance with a batch file. Help a dummy?
« Reply #2 on: October 24, 2014, 12:42:55 pm »
This intrigued me so I just had a quick play.
Path`s` are going to be different but for asteroids delux from AAE this Bat works for me...
Code: [Select]
@echo off
D:
CD "D:\emulators\64bit\AAE"

aae astdelux

And to start the asteroids.bat and another Batllezone plus bat via AHK hotkeys - this works....
Code: [Select]
a::
Send {Esc Down}, Send {Esc Up} ;quits aae
Sleep, 1000
Run, C:\Users\Mame seven\Desktop\AsteroidsDelux.bat
return
b::
Send {Esc Down}, Send {Esc Up} ;quits aae
Sleep, 1000
Run, C:\Users\Mame seven\Desktop\BattleZonePlus.bat
return
Not the most elegant way but it works.
This page has some good info for running bats without cmd windows popping up but it may be best just to call the games directly via AHK?.
Anyway hope that helps a bit?.

Louis Tully

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1800
  • Last login:February 13, 2015, 09:41:03 pm
[SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #3 on: October 24, 2014, 03:13:16 pm »
.
« Last Edit: February 12, 2015, 05:51:18 pm by Louis Tully »

jdbailey1206

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2656
  • Last login:March 11, 2023, 01:32:56 pm
  • No. It's your top score on Pole Position.
Re: [SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #4 on: October 24, 2014, 03:19:09 pm »
Now youre not a .bat dummy anymore.  They are neat little files once you get the hang of them. :)

rockyrocket

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 372
  • Last login:January 01, 2019, 02:13:03 pm
Re: [SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #5 on: October 24, 2014, 04:27:54 pm »
Sweet, get building!.
Thinking some more on this if your 3 game launch buttons were for example A,B and Shift then button combo`s can be used to shut down or reboot as well.
Code: [Select]
+A::Shutdown, 2 ;Reboot
+B::Shutdown, 1 ;Shutdown

You really would have a bare metal system then.
« Last Edit: October 24, 2014, 04:44:31 pm by rockyrocket »

Louis Tully

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1800
  • Last login:February 13, 2015, 09:41:03 pm
Re: [SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #6 on: October 25, 2014, 03:56:25 am »
.
« Last Edit: February 12, 2015, 05:51:55 pm by Louis Tully »

rockyrocket

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 372
  • Last login:January 01, 2019, 02:13:03 pm
Re: [SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #7 on: October 25, 2014, 04:55:00 am »
No worries, glad to help.
Put a shortcut to one of your Bat`s into your start up folder and you should just boot straight into a game and never see the desktop.

Now get building  ;D .

Edit - Glad you have no command window pop up, on my test bed (Win7-64) I do get a visable window so had to use that VBS trick linked to above.
It is messy as AHK calls a VBS that stars a Bat, but no window is seen - the VBS looks like this....
Code: [Select]
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Users\Mame seven\Desktop\AAE Bat`s\AsteroidsDelux.bat" & Chr(34), 0
Set WshShell = Nothing

And now the AHK is this...
Code: [Select]
#NoEnv
SetWorkingDir %A_ScriptDir%


a::
Send {Esc Down}, Send {Esc Up}
Sleep, 1000
Run, %A_ScriptDir%\Astdelux.vbs
return
b::
Send {Esc Down}, Send {Esc Up}
Sleep, 1000
Run, %A_ScriptDir%\BattleZonePlus.vbs
return
+A::Shutdown, 2 ;Reboot
+B::Shutdown, 1 ;Shutdown
« Last Edit: October 25, 2014, 05:35:08 am by rockyrocket »

Louis Tully

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1800
  • Last login:February 13, 2015, 09:41:03 pm
Re: [SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #8 on: October 25, 2014, 05:15:58 am »
.
« Last Edit: February 12, 2015, 05:52:10 pm by Louis Tully »

rockyrocket

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 372
  • Last login:January 01, 2019, 02:13:03 pm
Re: [SOLVED] Need some guidance with a batch file. Help a dummy?
« Reply #9 on: October 25, 2014, 05:19:30 am »
Looks good buddy!.
You ninja`ed a response in whilst I was editing my last post  ;D .

A funky select sound may be sweet too?
I use the attached photon sound in one of my cabs - just drop it or any other sound into the same dir as the AHK file and then use..
Code: [Select]
y::
SoundPlay, launch.mp3
Send {Esc Down}, Send {Esc Up} ;quits aae
Sleep, 1000
Run, C:\ADCabBatScripts\aaeAsteroids.bat
return

u::
SoundPlay, launch.mp3
Send {Esc Down}, Send {Esc Up} ;quits aae
Sleep, 1000
Run, C:\ADCabBatScripts\aaeAsteroidsDeluxe.bat
return

i::
SoundPlay, launch.mp3
Send {Esc Down}, Send {Esc Up} ;quits aae
Sleep, 1000
Run, C:\ADCabBatScripts\aaeArmorAttack.bat
return

You could even use a different sound for each game?.
« Last Edit: October 25, 2014, 07:08:58 am by rockyrocket »