Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: mahuti on May 30, 2017, 08:54:37 PM
-
I would like to be able to pick a menu item to launch the "tab" menu, rather than having to hit the tab key itself. Why? So I don't have to have a dedicated key just for "tab" or a keyboard, and I would only like setup to launch from the setup screen itself.
So I started poking around the internet... before I go off deep in the weeds testing a bunch of stuff out, I wondered if anyone had any input on this.
I was wondering if setting the "!! Press TAB to configure AM.sh" to be a bash script with some kind of xdotools or something similar would work. I haven't poked around in the code too much yet, just wondered if someone else had already done something like this.
-
You don't have to have a dedicated key just for "tab"... you can use a combo ;)
-
Yes. I get that, thanks for the suggestion.. But I would still prefer just being able to make a selection.
-
fe.signal("configure") ¿maybe this?
-
I'll take a look. Taking any ideas right now :-)
-
yep, fe.signal("configure") will launch settings just like pressing tab :)
-
I haven't investigated yet... I've been writing a screen saver tonight.
So... forgive my asking: how would one trigger fe.signal("configure") by clicking on a rom? I realize I could make a menu and do something that way, but it'd take a lot longer than leveraging the standard romlist. Maybe I'm not thinking about it right.
-
Maybe something like this:
fe.add_signal_handler("check_select");
function check_select( sig )
{
if ( sig == "select" )
{
if ([insert rom stuff here] == [romname])
{
fe.signal("configure")
return true;
}
}
return false;
}
-
This worked:
fe.add_signal_handler("check_select");
function check_select( sig )
{
if ( sig == "select" )
{
if (fe.game_info( Info.Title ) == "Press TAB to Configure")
{
fe.signal("configure")
return true;
}
}
return false;
}