This is the Minutes to Midnight clock, showing you how close to self-destruction on this planet. More can be explained by clicking Doomsday clock in the program.
Code:
FileDelete,%TEMP%\clock.png
FileDelete,%TEMP%\midnight.htm
UrlDownloadToFile,http://thebulletin.org/sites/all/themes/bas/images/clock.png,%TEMP%\clock.png
UrlDownloadToFile,http://thebulletin.org,%TEMP%\midnight.htm
Gui, Font, S12 CDefault Bold, Verdana
Gui, Add, Text, x6 y10 w250 h30 vtime, Loading...
Gui, Font, S8 CBlue Underline, Verdana
Gui, Add, Picture, x256 y10 w90 h90 gsecret, %TEMP%\clock.png
Gui, Add, Text, x6 y80 w240 h20 gGo, Doomsday Clock
; Generated using SmartGUI Creator 4.0
Gui, Show, x236 y301 h109 w362, Minute To Midnight
gosub Start
return
GuiClose:
FileDelete,%TEMP%\clock.png
FileDelete,%TEMP%\midnight.htm
exitapp
return
Start:
Gui,Submit,Nohide
FileRead,str,%TEMP%\midnight.htm
RegExMatch( str, "It is (.*?) Minutes to Midnight", match )
expand := % match
Guicontrol,,time,%expand%
return
Go:
run, http://thebulletin.org/content/doomsday-clock/overview
return
Secret:
Random,rand,1,5
If rand = 1
msgbox, Want a cookie?
If rand = 2
msgbox, I like cookies.
If rand = 3
msgbox, Do you like cookies?
If rand = 4
{
Random,rand2,1,3
If rand 2 = 3
msgbox, OMGRAWRLMAOROFLCOPTER, You found the secret one!!! (33`% Chance to get this)
Else
gosub Secret
return
}
If rand = 5
msgbox, You lose!
return