SRL Archive - Suggestions

Computer shutdown


Mr. Bottomtooth

2011-10-20 16:00:31

Is it possible to have an option in simba to shut down the computer after a script stops?

This would allow people to leave scripts running for long periods of time without supervision, feeling sure that should the script fail, the computer won't stay on for 24/48/72/+ hours in idle mode. I would leave scripts like MSI running a lot more often when going away for the weekend etc, since I would know it will shut down if something went wrong.

Is this possible?

Floor66

2011-10-20 17:47:09

I've seen scripts that used custom procedures for this.

E.g: hit windows key+R, typesend "shutdown -s"
That will bring up the "Run" window and tell windows to shut down.

onilika

2011-10-20 17:47:22

Yeah, that would be pretty handfull! Guys over SRL might get it :)
As a community, we can do everything !

Floor66

2011-10-20 17:49:04

Optionally you could use coord clicking but that would be very specific as a lot of people use lots of different resolutions, themes and OSes

Nava2

2011-10-20 19:00:40

System calls. :)

chitin

2011-10-20 19:17:02

theres a gazillion ways to get ur pc to shutdown . you can do it remotely thru ur phone but the simplest solution would be on a timer. via simba u can do a custom coordinate script, u can do thru cmd
i personally use "shutdown -f -s -t 00" to kill everything when i dont wana deal with closing sht. -f = force off -s = shutdown (can be -r for restart etc) -t 00 = time in seconds. 3600 = 1 hr.

depending on your privalages in ur pc, u can make a simple batch script with that command or w\e combination u want, or on ur windows, in "task schedueler" u can have it run a program (to shut down for example) - but in win 7 it has a built in shutdown function.

when i use a guest account i have a custom coordinate script. make sure to leave big intervals (mine are 10 seconds ) to give the pc time to bch n moan. which it will…

make sure to include the "end now button" different in win 7 than xp…w\e version u got…

basically u can make a script that checks on the other script….

i know this is hard to follow since im way too pressed for time to write this out correctly, and i thought id try to answer since ive experimented with this a bit, but if nothing else, you can ask others about some of the ideas ive listed.

onilika

2011-10-20 19:28:53

Through phone? Explain me that, please?

Also…an app wouldn't be possible for iOS/Android? To see proggies of the script we running atm, to shut it down remotely, and so on?

Mr. Bottomtooth

2011-10-20 20:21:09

I don't mean a remote way to shut down my computer. I also don't mean a timer.
I mean a way so the computer would automatically go off if and only if a script fails. If I set a timer to shut down my pc the script might still be running perfectly. And remotely shutting it down (with phone) doesn't really help either since there is no good way to know if the script is still running. I used to be able to do this with SRL-stats but I can't find (or it no longer exists) it anymore.

That's pretty much all I understood from chitin's post, sorry. :redface:

onilika

2011-10-21 09:56:39

From: Mr. Bottomtooth
I don't mean a remote way to shut down my computer. I also don't mean a timer.
I mean a way so the computer would automatically go off if and only if a script fails. If I set a timer to shut down my pc the script might still be running perfectly. And remotely shutting it down (with phone) doesn't really help either since there is no good way to know if the script is still running. I used to be able to do this with SRL-stats but I can't find (or it no longer exists) it anymore.

That's pretty much all I understood from chitin's post, sorry. :redface:


I set a timer from an app. Next morning, pc still running >.<

Floor66

2011-10-21 10:52:59

Why not just use AddOnTerminate to add a procedure that will, as I said before, hit Win+R -> shutdown -s -f -t 1

chitin

2011-10-21 14:06:33

From: Mr. Bottomtooth
I don't mean a remote way to shut down my computer. I also don't mean a timer.
I mean a way so the computer would automatically go off if and only if a script fails. If I set a timer to shut down my pc the script might still be running perfectly. And remotely shutting it down (with phone) doesn't really help either since there is no good way to know if the script is still running. I used to be able to do this with SRL-stats but I can't find (or it no longer exists) it anymore.

That's pretty much all I understood from chitin's post, sorry. :redface:


sorry i thought that might be the case. (that it was too hard to read haha)

basically u got 2 options:

either use a simba/srl procedure (if it exists and i dunno if it does) or make a script / ur own procedure? shouldnt be too hard..just have it detect the play button light up green or something. (when script is running play button is gray and stop is red. when its done play is green and stop is gray.)

if u want u can have it try to restart the script once or twice before shutting down…

From: Floor66
Why not just use AddOnTerminate to add a procedure that will, as I said before, hit Win+R -> shutdown -s -f -t 1


requires elevated privileges. as does task manager. assuming he had admin access it would certainly work. add on term will have to be added to every script tho. if he makes 1 to rule them all….lawls…ill stop myself there..

From: UNKNOWN69
Through phone? Explain me that, please?

Also…an app wouldn't be possible for iOS/Android? To see proggies of the script we running atm, to shut it down remotely, and so on?


theres tons. u can use a remote desktop tool. a remote shutdown app. or if u got a jailbroken iphone u can just send it cmd commands lol.

i was mainly talking about iphone/ios sorry.

Floor66

2011-10-21 15:01:26

Suppose you could also just put a VNC server on your computer that works with ios/android devices.

mastaraymond

2011-10-22 13:26:07

You can do this, enable api's, and find the api to call an extern executable (obviously shutdown.exe with parameter -s).

Or you can just download an extern application that shuts your pc down at a certain time.