Post #1 · Posted at 2017-11-29 05:05:51am 6.4 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Hi all,
Just wondering if it's possible to create a button for the operator menu that can shutdown the computer SM is running on? Just curious as I think it would be a handy feature so I could shut down directly from the game rather than having to exit then use a keyboard or mouse to shutdown.
Just figured I'd ask in case someone has already worked something like that out.
Just wondering if it's possible to create a button for the operator menu that can shutdown the computer SM is running on? Just curious as I think it would be a handy feature so I could shut down directly from the game rather than having to exit then use a keyboard or mouse to shutdown.
Just figured I'd ask in case someone has already worked something like that out.
Post #2 · Posted at 2017-11-29 01:53:15pm 6.4 years ago
Kyzentun | |
---|---|
Member | |
3,209 Posts | |
Reg. 2008-02-20 | |
"I'm honestly pissed off." |
Add an option that goes to ScreenExit.
Post #3 · Posted at 2017-11-29 02:21:13pm 6.4 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Thanks for that. I was after shutting down the whole PC though.
I did a bit more searching and found the os.execute function of lua, but then I searched for that specifically regarding SM5 and found a thread that you had commented in saying that the os.execute function isn't available in SM5. So what I'll do is just make a batch file to open SM and then keep checking if SM is still open and if it closes I'll get the cmd to shutdown the PC.
Might not be as clean as doing it from the theme, but it will do Thanks for letting me know about the ScreenExit though, that'll work great in my operator menu (and will help me create the solution I need)!
I did a bit more searching and found the os.execute function of lua, but then I searched for that specifically regarding SM5 and found a thread that you had commented in saying that the os.execute function isn't available in SM5. So what I'll do is just make a batch file to open SM and then keep checking if SM is still open and if it closes I'll get the cmd to shutdown the PC.
Might not be as clean as doing it from the theme, but it will do Thanks for letting me know about the ScreenExit though, that'll work great in my operator menu (and will help me create the solution I need)!
Post #4 · Posted at 2017-12-04 08:47:09am 6.3 years ago
ZTS | |
---|---|
Member | |
139 Posts | |
Not Set | |
Reg. 2015-01-13 | |
"But enough talk! Have at you!" |
Last updated: 2017-12-04 08:49am
I'm not too sure what your use case is for this, but if you're putting it on an arcade there are better ways.
If you've used Windows Embedded before you can configure eShell.exe to react to the program it's launching. One option is to shut down the system when the program closes.
This doesn't account for StepMania crashing, but if you're putting it on an arcade you might as well just edit the source code so StepMania immediately restarts in a crash.
Another thing... Can't you make a batch file that runs shutdown after StepMania closes? If you put the shutdown command after the command to run StepMania it will wait.
If you've used Windows Embedded before you can configure eShell.exe to react to the program it's launching. One option is to shut down the system when the program closes.
This doesn't account for StepMania crashing, but if you're putting it on an arcade you might as well just edit the source code so StepMania immediately restarts in a crash.
Another thing... Can't you make a batch file that runs shutdown after StepMania closes? If you put the shutdown command after the command to run StepMania it will wait.
Post #5 · Posted at 2017-12-04 09:03:10am 6.3 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Quote: ZTS
I'm not too sure what your use case is for this, but if you're putting it on an arcade there are better ways.
If you've used Windows Embedded before you can configure eShell.exe to react to the program it's launching. One option is to shut down the system when the program closes.
This doesn't account for StepMania crashing, but if you're putting it on an arcade you might as well just edit the source code so StepMania immediately restarts in a crash.
Another thing... Can't you make a batch file that runs shutdown after StepMania closes? If you put the shutdown command after the command to run StepMania it will wait.
If you've used Windows Embedded before you can configure eShell.exe to react to the program it's launching. One option is to shut down the system when the program closes.
This doesn't account for StepMania crashing, but if you're putting it on an arcade you might as well just edit the source code so StepMania immediately restarts in a crash.
Another thing... Can't you make a batch file that runs shutdown after StepMania closes? If you put the shutdown command after the command to run StepMania it will wait.
I'm just running it at home on my cabinet I've built, not an arcade. I already have made scripts to check if it's a legit shutdown or not (I just made it so if I press a specific arrow on the P1/P2 controls it either will shutdown or restart SM).
Thanks for the suggestions though!