Attract-Mode Support > Scripting

Launch Decorator plugin

(1/3) > >>

alucard:
Hi All,
I wrote a plugin to execute script before and/or after game execution.

LaunchDecorator has configurable ScriptRoot (and extensions) and follows convention
over configuration approach to find and run scripts

ScriptRoot
ʉӣ + emulator name
 â”ƒ â”— -- before.{script extension}
 â”ƒ â”— -- after.{script extension}
 â”ƒ â”— ...
 â”ƒ â”— -- before.{game name}.{script extension}
 â”ƒ â”— -- after.{game name}.{script extension}
 â”ƒ â”— ...
 â”ƒ
ʉӣ + another emulator name
ʉӣ +..

All ScriptRoot child elements are optional and script extensions can be mixed.

Plugin and instructions can be found here:
https://github.com/matteocedroni/am-launch-decorator-plugin

manzarek:
Then I create a folder in AT with the name ScriptRoot
inside I create a folder with the name Mame and inside I put the file created bat to open a video, before.bat


--- Code: ---@echo off
start "vlc" "H:\attract-v2.6.1\ScriptRoot\mame\logo_open.mp4"
exit
--- End code ---

when I launch any mame game, the video opens, but then AT freezes, without the game being started after the video, what am I wrong?

alucard:
Interesting.

I can investigate but probably it's a windows focus problem.

This particular kind of script runs action that cause AttractMode lose focus. AttractMode can lose focus only after game is launched.

Your needs seems a sort of Fade To/From Game function. A function strictly performed by AttractMode while keeping focus.
FadeToGame plugin exists, but current version doesn't play video.

ReBirFh:
Sounds useful, can you give some practical examples/use cases?

manzarek:

--- Quote from: alucard on March 02, 2021, 10:14:11 AM ---Your needs seems a sort of Fade To/From Game function. A function strictly performed by AttractMode while keeping focus.
FadeToGame plugin exists, but current version doesn't play video.

--- End quote ---
Exactly I wanted to use it for this purpose, a kind of video loading of games.

Navigation

[0] Message Index

[#] Next page

Go to full version