AutoHotkey Community

It is currently May 26th, 2012, 7:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: April 25th, 2009, 6:46 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
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


Last edited by Fry on April 25th, 2009, 7:35 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2009, 7:28 pm 
Offline

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
hmmm, not showing anything but a picture and a link. is anything else supposed to show?


Curious: did you get this idea from NCIS? just a day or 2 ago they had a picture of this clock on the show.

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2009, 7:32 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Updated code

Also I dont even know what NCIS is.... so no


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 26th, 2009, 3:09 am 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
tidbit wrote:
Curious: did you get this idea from NCIS? just a day or 2 ago they had a picture of this clock on the show.


NCIS isn't on until next Tuesday >.<

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 1st, 2009, 7:47 pm 
Offline

Joined: January 9th, 2008, 9:07 pm
Posts: 16
I wasn't able to get the secret msgbox... but then I found this in your code:

Code:
If rand 2 = 3


Should be (you have an extra space in there):

Code:
If rand2 = 3


Now I can get the secret msgbox! :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2009, 12:29 am 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Cool


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Scratch, Xx7 and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group