Is it possible to shut down the pc using lua scripting?
Nice thought.
But i thought Lua scripts are made for working of Ptokax. Not for PC.
You can have better shut down softwares than making a script for it.
It would have been better if the script would have been such that it would stop ptokax at a desired time and resume it back on a desired time. and addition to it will be saving config when it shut downs or say hibernates.
You can create (DOS) batch files and put them into the Task Schedular of Windows.
Just a tip.
thanks guys for the help
wat i wanted to do is!
wen we have users less than 3 hub shud stop n PC shud shut down!
neways i got the point dat stifler bro said
QuoteLua scripts are made for working of Ptokax. Not for PC.
so m sorry for such a silly Ques ;D
thanks for reply once again :)
Well thanks for that but i got negative karma for no reason....
Well i run a hub on my LAN network bt not in INTERNET.
Its a time bound hub where its only runs in evenin through out the nite till mornin.
Sometime i only keep the comp on for the hub, bt many times we have very less users in the hub and this happns only late in night.
So wat i was thinkin to have a script wich checks the user count at regular intervals and wen we have very less users in the hub we can stop the hub and shut down the computer!
i can script for checking the user count at regular intervals bt shutting down the computer was not possible for me. so came up here for help ;D
ne more Queries Mutor Bro?
Quote from: ?StIfFLEr?? on 06 May, 2009, 21:45:14
Well thanks for that but i got negative karma for no reason....
Hm.... Now I've got that too... Should I reply to help ppl?
Satya: I think it is possible to shutdown your windows by using a os.execute() command. But, settings in your hub might be unsaved this way. And, when having a *hick* in the network, you might loose your users anyway for a short time. Be aware if this.
I got one again....
-ve
Omg, too much posts and nobody is able to help with something that easy :-X
Shudown on Windoze:
os.execute("shutdown %-s %-t 01")
Shutdown on Linux:
os.execute("shutdown %-h now")
And as TTB points out, is good idea to save settings before that 8)
Thank you every one for the help
QuoteBut, settings in your hub might be unsaved this way. And, when having a *hick* in the network, you might loose your users anyway for a short time. Be aware if this.
Ya TTB, i totally understand dat hence i wd save the settings b4 shuttin down the comp and ya the hick in the network is there, bt at late night we rarely have ne prob with the network hence we have taken this step.
Stifler bro trust me i have no idea abt the -ve karma i do applaud every guys who helps me out.
QuoteOmg, too much posts and nobody is able to help with something that easy Lips Sealed
Shudown on Windoze:
Code:
os.execute("shutdown %-s %-t 01")
Shutdown on Linux:
Code:
os.execute("shutdown %-h now")
And as TTB points out, is good idea to save settings before that Cool
And last bt by no means least ;D thanks PPK for the solution ;)