Author Topic: exit display help  (Read 9307 times)

Steven Campoli

  • Guest
exit display help
« 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...
« Last Edit: October 20, 2018, 02:43:54 PM by Steven Campoli »

Steven Campoli

  • Guest
Re: exit display help
« Reply #1 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
« Last Edit: October 20, 2018, 04:31:51 PM by Steven Campoli »

Steven Campoli

  • Guest
Re: exit display help
« Reply #2 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

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: exit display help
« Reply #3 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;
}
help a friend....

Steven Campoli

  • Guest
Re: exit display help
« Reply #4 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!

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: exit display help
« Reply #5 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?

Steven Campoli

  • Guest
Re: exit display help
« Reply #6 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.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: exit display help
« Reply #7 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).
« Last Edit: October 22, 2018, 12:03:43 AM by progets »

Steven Campoli

  • Guest
Re: exit display help
« Reply #8 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...

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: exit display help
« Reply #9 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.
« Last Edit: October 22, 2018, 10:19:47 PM by progets »

Steven Campoli

  • Guest
Re: exit display help
« Reply #10 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!
« Last Edit: October 23, 2018, 07:06:00 AM by Steven Campoli »

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: exit display help
« Reply #11 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.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: exit display help
« Reply #12 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.

Steven Campoli

  • Guest
Re: exit display help
« Reply #13 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....
« Last Edit: October 24, 2018, 08:17:38 AM by Steven Campoli »

Steven Campoli

  • Guest
Re: exit display help
« Reply #14 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.
« Last Edit: October 26, 2018, 07:49:05 AM by Steven Campoli »