Jump to content

SystemPowerDown like scheduler


Nuffilein805
 Share

Recommended Posts

Hi there,

i just did some little programming here and i don't know if it's usefull at all. Just did it because of some idiots at my company that keep their PC going through the whole night. Well that wouldn't be so bad if they wouldn't stay in some progs where i want to do updates so i can't. Eventually the rooms are locked then and i can't go in, so here comes my prog. Just shuts down the PC at 8pm.

Don't know if anyone needs but i post it here.

#NoTrayIcon

HotKeySet ("!+P", "disabletoday")

$lang = iniread ("lang.ini", "Language", @OSLang, "");checks the language
if $lang = "" Then;checks if language is supported
    $lang = "English";sets default to english
EndIf

$title = IniRead ("lang.ini", $lang, "title", "");sets title
$message = IniRead ("lang.ini", $lang, "message", "");sets message

Do
    if @hour = 17 Then;if it's past 5pm sends message
        msgbox (0, $title, $message, 180);3min timer
    EndIf
    
    if @hour = 20 Then;if it's past 8pm shuts and powers down
        Shutdown (9);shutdown + powerdown
    EndIf
    sleep (600000)
until 1 = 2

func disabletoday()
    Do
        sleep (600000);sleeps until 9pm
    until @HOUR = 21
EndFunc

If someone needs it and want his language included plz send me the new ini-file.

And plz tell me if it works.

thx

Seems like I haven't uploaded the ini-file. Did this now!

Both files in the zip-file ---i hope.

shutdown.zip

Edited by Nuffilein805
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...