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: Mala command on exit not running?  (Read 3705 times)

0 Members and 1 Guest are viewing this topic.

raph

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:September 11, 2022, 11:42:35 pm
  • Gradually adding bells and whistles to a stock cab
Mala command on exit not running?
« on: August 14, 2015, 03:53:38 am »
I have set up a little VBScript to swap out different marquees for each emulator, and I am calling the script using pre- and post-commands. The way I am doing it is simply setting the desktop background, after failing to get Mame Hooker to work with every emu, failing to get Marquee Magician to work foe emus (works GREAT for games in MAME), and disliking the way CPWizard shows a slideshow of lots of images.

To hide the pre command, I have ticked the check box for using a start picture. That covers the pre command pop up nicely. The post command sets it back to the frontend's marquee.

I'd like to set the background back to the normal one after exiting Mala, but the Mala exit hook simply does not seem to fire. Anyone else had this problem?

I'd also like to set it upon Mala start, but there's no precommand there. I am thinking of creating a dummy emu and firing it as a "start game" but I don't know if Mala would detect it exiting properly. Hmm.

big10p

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 698
  • Last login:May 01, 2023, 01:46:23 pm
  • Mmmm, arcade classics!
Re: Mala command on exit not running?
« Reply #1 on: August 14, 2015, 07:11:58 am »
What about writing a simple script/program that you launch on windows startup that then does your pre-mala stuff, then launches mala, then does you post-mala stuff after mala has been exited?

raph

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:September 11, 2022, 11:42:35 pm
  • Gradually adding bells and whistles to a stock cab
Re: Mala command on exit not running?
« Reply #2 on: August 14, 2015, 03:16:46 pm »
That's a good idea. The cab is not yet set up to "boot to Mala" given that I have been working on it so much, but that makes sense.

Could also just make that script a shortcut and use that to launch Mala in the meantime.

Thanks!  :cheers:

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Mala command on exit not running?
« Reply #3 on: August 16, 2015, 10:13:46 am »
I like this idea.
Just put a shortcut to your script on your desktop and run it when in test mode.
When you are ready, put a shortcut to your script in the windows startup folder.
Easy Peezy.

raph

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:September 11, 2022, 11:42:35 pm
  • Gradually adding bells and whistles to a stock cab
Re: Mala command on exit not running?
« Reply #4 on: August 16, 2015, 11:18:17 pm »
So, I ended up doing this and it works a treat.

A launchmala.ahk that looks like this:

Code: [Select]
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Run SetWallpaper.vbs
RunWait D:\Frontends\MaLa\MaLa174\mala.exe
Run SetWallpaper.vbs D:\Snaps\Emumarquees\desktop.jpg
ExitApp

Change desktop.jpg to be what you want for your cab's desktop when not in Mala.

A SetWallpaper.vbs that looks like this:

Code: [Select]
set ws = wscript.createobject("WScript.shell")

If WScript.Arguments.Count = 0 then
  strArg = "D:\Snaps\Emumarquees\marquee-main.png"
Else
  strArg = WScript.Arguments.Item(0)
End If
strCommand = "D:\Utilities\SetWallpaper\SetWallpaper.exe " & strArg
ws.run(strCommand), 0, true

To create a VBS, just make a text file then rename it with a .vbs extension.

Change the line with "marquee-main.png" to be the marquee you want for your cab as a whole; this is your "default."

And finally, SetWallpaper.exe, which many folks have written but I used the one from here: http://sg20.com/techblog/2011/06/23/wallpaper-changer-command-line-utility/

In Mala, each emulator gets this as a precommand:

Code: [Select]
wscript D:\Utilities\SetWallpaper\SetWallpaper.vbs D:\snaps\Emumarquees\marquee-vectrex.png
(Change the path to be the marquee you want, of course).

And this as a post command:

Code: [Select]
wscript D:\Utilities\SetWallpaper\SetWallpaper.vbs
Which uses the default from the VBS.

You need to wrap the .exe in the .vbs because otherwise you get an unsightly DOS window flashing by. I also stuck some defaults in the VBS, as you can see.

Finally, to cover up the unsightly "precommand #1" window popup Mala does, I suggest that you turn on the layout option to have a full screen splash.

If you have all of these set up, the effect should be:

You start at your desktop, with a nice fullscreen wallpaper. Your marquee also has this desktop.

You launch Mala from the launchmala shortcut. The marquee changes to the cab marquee.

You launch an emu, say ParaJVE or Stella, or whatever. The marquee changes to one you have made for that emulator specifically, like these:


(I use this with the DICE emulator for old integrated circuit games)



You exit the emu and return to Mala. The cab marquee returns.

You quit Mala. The desktop comes back.



Used in tandem with Mame Hooker, this gives marquees on every emu, and Mame Hooker covers all the marquees for the individual MAME games.