As far as your admin button causing the PC to go into standby from the frontend:
In your 3Darcade fe cfg file look for this entry:
exitcomp|false|false,shutdown,poweroff,logoff,reboot,restart|If set to true the frontend will after the kquit key has been pressed shutdown the computer.|
I don't know what the difference is between 'shutdown' and 'poweroff', but perhaps one of those can be used to place the PC in standby? You could post that question on the 3Darcade forum.
As far as in-game exiting with your admin button, isn't that just a matter of going into the MAME setup screen and selecting that button as the default exit-to-frontend button?
If you are trying to make your admin button exit to the frontend when using other emulators then I wonder if you could write an AutoIt script to help with this?
some thoughts:
-Make the admin button a hot key using the HotKeySet function
-Use the ProcessClose function so when the hotkey is pressed it closes the particular emulator in question.
In this example the space button is the hotkey and causes the Visualboy Advance emulator to close:
HotKeySet("{SPACE}", "Exitemulator")
While 1
Sleep(100)
WEnd
Func Exitemulator()
ProcessClose ("VisualBoyAdvance-SDL.exe")
Exit (0)
EndFunc
In 3DArcade's emulator config file you have the option of having 3DArcade run an executable before an emulator is launched (RUNBEFORE) and you can use this in conjunction with your scripts to do some interesting things. You also have the RUNAFTER command line to use as well. A combination of these two can allow for many things. In my situation I have certain scripts execute before a particular emulator is launched which remaps various keys to work properly with that particular emulator and then have a script that executes after returning to the FE that effectively cancels the first set of scripts returning all my keys to default value. I don't claim this is the best or easiest way to do things but it works well for me.
Look for these lines in the 3DArcade femame cfg file:
runbefore||#fullexe|Format: commandline/runmethod/wait. Run an executable before the emulator to be launched by using normal,hidden, minimised or maximised and either wait (true) or don't wait (false) for its execution to be finished. The commandline accepts variables (field 2= $02) that reference the contents of fields of a gamelist entry.|
runafter||#fullexe|Format: commandline/runmethod/wait. Run an executable after the emulator to be launched by using normal,hidden, minimised or maximised and either wait (true) or don't wait (false) for its execution to be finished. The commandline accepts variables (field 2= $02) that reference the contents of fields of a gamelist entry.|