Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: Steven Campoli on October 20, 2018, 01:45:26 PM

Title: exit display help
Post by: Steven Campoli on October 20, 2018, 01:45:26 PM
hey guys i created a display called exit...
now when i push the enter button i want it to close...what can i add in the cfg attract file to shuting down instead of loading system menu...
Title: Re: exit display help
Post by: Steven Campoli on October 20, 2018, 02:58:38 PM
is their a param i can add in the cfg file to close am and not make it load a display


* im doing this because i want this to be the first screen when opening AM
Title: Re: exit display help
Post by: Steven Campoli on October 21, 2018, 08:09:16 AM
or even in the layout file..what can i add to make a layout.nut that just shuts down the system?

i tried the following but nothing happens

//
// Attract-Mode Front-End - "Exit" sample layout
//

set_custom_controls ( "Exit Attract-Mode?" )

FeText ( "Exit Attract-Mode?" )

Overlay.Exit

displays_menu_exit   yes
Title: Re: exit display help
Post by: jedione on October 21, 2018, 02:12:54 PM
im thinking it would look somthing like this,  but it dont work

Code: [Select]
function on_transition_StartLayout( ttype, var, ttime ) {
 switch ( ttype ) {
  Transition.StartLayout:
        fe.signal( "exit" );
       break;
  }
 return false;
}
Title: Re: exit display help
Post by: Steven Campoli on October 21, 2018, 02:27:28 PM
im thinking it would look somthing like this,  but it dont work

Code: [Select]
function on_transition_StartLayout( ttype, var, ttime ) {
 switch ( ttype ) {
  Transition.StartLayout:
        fe.signal( "exit" );
       break;
  }
 return false;
}

thanks for replying...im gonna mess with this abit...still no luck!
Title: Re: exit display help
Post by: keilmillerjr on October 21, 2018, 04:40:32 PM
if display name is X, launch terminal with shutdown arguments.

Why not use the built in exit feature of display menu?
Title: Re: exit display help
Post by: Steven Campoli on October 21, 2018, 05:39:49 PM
Because when I use the built in one and close am it doesn’t re open on that display..for example if I close it on ps or nes and re open it that will be the selection it’s on... if I exit on the exit screen and reopen it goes to the system On the left... I want the exit screen to be the first screen when opening.
Title: Re: exit display help
Post by: progets on October 21, 2018, 11:56:44 PM
Because when I use the built in one and close am it doesn’t re open on that display..for example if I close it on ps or nes and re open it that will be the selection it’s on... if I exit on the exit screen and reopen it goes to the system On the left... I want the exit screen to be the first screen when opening.

It sounds like you just solved your own problem. Make your exit emulator the first entry in your attract.cfg file (or as you call it "the system On the left") and then exit using builtin menu.

Really, I'm kidding (all though it probably would work). I see that you're the "squeaky wheel gets the oil" type of person (i.e. 50 of your 60 posts are about exiting AM across multiple threads).

Your desire isn't built into AM. You can accomplish this by using the AM exit command to call a script that you make that modifies/replaces/updates the attract.am file that holds this information. The first line of the attract.am is read when you launch AM and it tells it what to load.

First line of attract.am
Code: [Select]
5;5,1,6;

The breakdown is something like this (I figured it out a while ago so it's not fresh on my memory and you'll need to test) 5 (5th emulator listed in the attract.cfg); 5 (5th display listed in the attract.cfg), 1 (filter applied to the display); 6 (game position within the display and filter rules);

BTW - the counts listed above start at 0 and not 1 (like most things in the computer world).
Title: Re: exit display help
Post by: Steven Campoli on October 22, 2018, 05:03:01 PM
Because when I use the built in one and close am it doesn’t re open on that display..for example if I close it on ps or nes and re open it that will be the selection it’s on... if I exit on the exit screen and reopen it goes to the system On the left... I want the exit screen to be the first screen when opening.

It sounds like you just solved your own problem. Make your exit emulator the first entry in your attract.cfg file (or as you call it "the system On the left") and then exit using builtin menu.

Really, I'm kidding (all though it probably would work). I see that you're the "squeaky wheel gets the oil" type of person (i.e. 50 of your 60 posts are about exiting AM across multiple threads).

Your desire isn't built into AM. You can accomplish this by using the AM exit command to call a script that you make that modifies/replaces/updates the attract.am file that holds this information. The first line of the attract.am is read when you launch AM and it tells it what to load.

First line of attract.am
Code: [Select]
5;5,1,6;

The breakdown is something like this (I figured it out a while ago so it's not fresh on my memory and you'll need to test) 5 (5th emulator listed in the attract.cfg); 5 (5th display listed in the attract.cfg), 1 (filter applied to the display); 6 (game position within the display and filter rules);

BTW - the counts listed above start at 0 and not 1 (like most things in the computer world).

What number would be the exit display? I tried them all lol...0-6 are my emulators (I don’t have many ) I try 7-8-9..-1... lol still no...
Title: Re: exit display help
Post by: progets on October 22, 2018, 10:16:56 PM
Post your attract.cfg. I have no way to know your exit menu number without it. Every system is unique.

Also post your exit menu romlist.
Title: Re: exit display help
Post by: Steven Campoli on October 23, 2018, 02:53:39 AM
The default exit display is not in the attract.cfg file.
As I said before I made a custom exit display but can’t get it to actually shutdown the system.
The number of the custom exit display is simple and I was able to load it with that but the display doesn’t exit (i tried making a layout.nut for this custom display but cant find the comand to make it exit when selected)

so I went back to the default exit display which is not in the attract.cfg file.

I’m just trying to get am to open on the exit display by default. The only reason I created one is because am doesnt launch on the built in one.

I attached a screen with the built in exit display. I would like am to open on this display. Thanks!
Title: Re: exit display help
Post by: progets on October 23, 2018, 11:10:31 PM
Either I don't understand what you're trying to accomplish or you don't understand how AttractMode works. I think you need to be very specific in what you are asking for and provide your OS and version of AttractMode.

The "builtin" exit menu isn't a "Display". It also doesn't look like the image you provided but maybe you're using a modified "builtin" exit menu. Is this the case?

"Displays" in AttractMode open systems/emulators (i.e. MAME, NES, SNES, etc.). "Displays" do not execute games, commands or scripts. "Romlists" in AttractMode contain the list of games/executables/scripts that will be run.

I don't know of a way to have AttractMode load and show you the "builtin" exit menu. There is a way to create an exit/setup/reboot "Display" and then create an "Emulator" that runs (.bat or .sh files depending on your OS) and then create scripts (.bat or .sh files depending on your OS) to shutdown your device. This "Display" could be set to be the first thing you see.
Title: Re: exit display help
Post by: rand0m on October 24, 2018, 02:45:31 AM
A duct tape solution:

> Create emulator settings for custom exit display with "executable" being "cmd" and "romext" being "bat"
> Create bat files to exit AM and to exit Windows (Shutdown)

Not directly related but I wonder if there is only one rom (say exit-AM.bat) in a romlist, it can be executed directly by opening that display.
Title: Re: exit display help
Post by: Steven Campoli on October 24, 2018, 07:25:14 AM
im using hyperpie 2 theme, windows 10, latest version of AM

when i select "ALLOW EXIT ON DISPLAY MENU" i get the exit display....the only thing i did was change the graphics on it from the image above....i understand how AM works and that the display menu opens emulators....when i select yes to alow exit on display menu i get the pic above, i just changed the exit graphics....all i want is for am to load on the "allow exit from display menu" where the power button is on my pic above thats the "allow exit from display menu" i just changed the wheel image and added menu art....
Title: Re: exit display help
Post by: Steven Campoli on October 26, 2018, 07:35:01 AM
A duct tape solution:

> Create emulator settings for custom exit display with "executable" being "cmd" and "romext" being "bat"
> Create bat files to exit AM and to exit Windows (Shutdown)

Not directly related but I wonder if there is only one rom (say exit-AM.bat) in a romlist, it can be executed directly by opening that display.

i am trying this...i created the bat...how can i launch the bat without going in the display.

i can only launch the bat by going in the display and selecting it.
Title: Re: exit display help
Post by: progets on October 26, 2018, 07:32:20 PM
i am trying this...i created the bat...how can i launch the bat without going in the display.

i can only launch the bat by going in the display and selecting it.

You can't. Like mentioned above...
Quote
"Displays" in AttractMode open systems/emulators (i.e. MAME, NES, SNES, etc.). "Displays" do not execute games, commands or scripts. "Romlists" in AttractMode contain the list of games/executables/scripts that will be run.

You can set Configure-->General-->Start Mode = Show Last Selection (Default). This will open AM to your exit Display ready to select shutdown as long as you previously used this method to shutdown.