Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Shutdown Timer


  • Please log in to reply
No replies to this topic
System Monitor
  • Members
  • 508 posts
  • Last active: Mar 26 2012 05:13 AM
  • Joined: 09 Mar 2007
Not sure if this has been done before, but I am going on vaction and need to download a huge file and would like my computer to shutdown it self. You can easily choose how long you would like to wait before your computer shuts down.

I am planning to add a counting timer later.

;Seconds
Gui, Add, Edit, w35 h20
Gui, Add, UpDown, vSec Range0-60, 0
Gui, Add, Text, x48 y10 w45 h20 , Seconds
;Minutes
Gui, Add, Edit, w35 h20 x10 y30
Gui, Add, UpDown, vMin Range0-60, 0
Gui, Add, Text, x48 y33 w40 h20 ,Minutes
;Hours
Gui, Add, Edit, w35 h20 x10 y55
Gui, Add, UpDown, vHr Range0-24, 0
Gui, Add, Text, x48 y58 w40 h20 ,Hours
;Days
Gui, Add, Edit, w35 h20 x10 y80
Gui, Add, UpDown, vDay, 0
Gui, Add, Text, x48 y83 w40 h20 ,Days
;Button
Gui, Add, Button, x10 y105 w80 gShutdown, Wait . . .
Gui, Show, x0 y0 h130 w100,
Return

Shutdown:
Gui,submit
Sec := %Sec% * 1000
Min := %Min% * 60000
Hr := %Hr% * 3600000
Day := %Day% * 86400000
Total = %Day% + %Hr% + %Min% + %Sec%
Sleep,%Total%
Shutdown,1


GuiClose:
ExitApp