Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - theamity9

Pages: [1]
1
Scripting / Quit AM After Holding Button Down For Some Time
« on: May 07, 2018, 08:47:02 PM »
Is there a script to have AM close only when the close AM hotkey has been held down for a defined duration of time?

And so it'll ignore it if the button was only pressed regularly?


Code: [Select]
if(ESC is_pressed_for(100)){
   exit;
}

2
Scripting / Customised Listbox
« on: May 06, 2018, 01:42:50 AM »
I tried implementing this:
https://github.com/mickelson/attract/wiki/Layouts---advanced-lists

Code: [Select]
function trimmed_name( index_offset ) {
    local s = split( fe.game_info( Info.Title, index_offset ), "(" );
    if ( s.len() > 0 )
        return s[0];

    return "";
}

local slot_a = fe.add_text( trimmed_name( -2 ), 100, 100, 900, 50 );
local slot_b = fe.add_text( trimmed_name( -1 ), 100, 150, 900, 50 );
local slot_c = fe.add_text( trimmed_name( 0 ), 100, 200, 900, 50 );
local slot_d = fe.add_text( trimmed_name( 1 ), 100, 250, 900, 50 );
local slot_e = fe.add_text( trimmed_name( 2 ), 100, 300, 900, 50 );

fe.add_transition_callback( "update_my_list" )
function update_my_list( ttype, var, ttime )
{
    if ( ttype == Transition.ToNewSelection )
    {
        slot_a.msg = trimmed_name( var - 2 );
        slot_b.msg = trimmed_name( var - 1 );
        slot_c.msg = trimmed_name( var );
        slot_d.msg = trimmed_name( var + 1 );
        slot_e.msg = trimmed_name( var + 2 );
    }
    return false;
}

However as much as I try I can't get it to respond correctly when transitioning to a new list.

Does anybody have a fully functioning one of this script with changing filters working correctly?

3
General / Attract Mode not saving Mame input config
« on: May 04, 2018, 05:27:48 PM »
When running mame through AM and I map the buttons, when I next boot the game it's forgotten my buttons. But if I change them on mame directly it's fine. Any suggestions?

I imagine its a Windows issue and AM doesn't have the write permission on the files for some reason but I'm not sure. If it is I'm not sure how to fix it

4
General / Open File With ROM
« on: May 03, 2018, 01:40:34 AM »
I'm using AM to frontend my MAME build. I was wondering if there's a way to run a 2nd file along with certain ROMs. IE:
If game X is ran open file.bat

Pages: [1]