Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • February 08, 2016, 07:38:51 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Graphic Countdown with Random Reset  (Read 4629 times)

flisflis

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
IDEA: Graphic Countdown with Random Reset
« on: February 12, 2007, 02:09:11 PM »
Hello

I have been trying to work on this myself but not very successfully, as I haven't done much of this before.

I need a countdown, starting at 500, which is displayed at 1 second intervals. The countdown is never to reach 0; at random intervals, the countdown restarts. The restart is from a random number between 500 and the current number (I need it to be a little less obvious than restarting from 500 each time).

Ideally I would like the numbers to be displayed as seven-segment digits, like on stop watches, and as large as possible.

Thanks

Crush

  • Member
  • Joined in 2006
  • **
  • Posts: 399
  • Hello dude!
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #1 on: February 12, 2007, 02:49:54 PM »

GREAT IDEA!
...
How to hell could someone use this crazy counter in a senseful way?

flisflis

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #2 on: February 12, 2007, 06:15:26 PM »
It's part of an art project looking at avoided endings. I'm not sure if that counts as 'senseful', but it's why.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,717
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #3 on: February 12, 2007, 07:35:42 PM »
easy enough to do.. i'm sure someone will come along and write this up.  would be nice to hear more about your experiment though..

hwtan

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 72
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #4 on: February 12, 2007, 11:07:58 PM »
You can find the program at http://donationcoder...ntDown/CountDown.rar
Source code is available at http://donationcoder...own/CountDownSrc.rar

To customize the LEDs, please edit the LED?.gif files in the images directory.  A photoshop image (LED.psd) is included.
To go to full-screen mode, please double-clicked on the digits.



flisflis

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #5 on: February 13, 2007, 08:14:52 AM »
Thanks so much!

Unfortunately when I extract this, I get a warning message when I try to run the .exe file:

"Countdown.exe: Unable to locate component
This application has failed to start because MFC71.DLL was not found."

Flis

flisflis

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #6 on: February 13, 2007, 08:28:05 AM »
Fixed it!

Sorry, takes me a little longer to work these things out. Art student, and all that. It looks great - you're a star!

Flis

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #7 on: February 13, 2007, 12:08:24 PM »
 :) Or for a proper random, proper restart, transparent, maximized version, try BadCountDown.

Save the script as BadCountDown.ahk, download and install AutoHotkey to run.

It uses ethan's images, so place the images in subfolder called images, and name them LED0.gif through LED9.gif.

Skrommel

;BadCountDown.ahk
; Counts down, but never reaches 0
;Skrommel @2007

#NoEnv
#SingleInstance,Force

firststart=500

Gui,Destroy
Gui,-Border -Caption +ToolWindow +AlwaysOnTop
Gui,Margin,0,0
Gui,Color,FFFFFF
StringSplit,char_,firststart
w:=A_ScreenWidth/char_0
Loop,% char_0
{
  picture:="images\LED" . char_%A_Index% . ".gif"
  Gui,Add,Picture,vpic%A_Index% x+0 yp w%w% h-1,%picture%
}
Gui,Show,,Timer!
WinSet,TransColor,FFFFFF,Timer!

start:=firststart
Loop
{
  If A_Index>1
    Random,start,% start-count,% firststart
  Random,count,1,% start-1
  Loop,% count
  {
    Sleep,999
    number:=start-A_Index+1000000
    StringRight,number,number,StrLen(firststart)
    StringSplit,char_,number
    w:=A_ScreenWidth/char_0
    Loop,% char_0
    {
      picture:="images\LED" . char_%A_Index% . ".gif"
      GuiControl,,pic%A_Index%,%picture%
    }
  }
}
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
« Last Edit: February 13, 2007, 12:12:00 PM by skrommel »

flisflis

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #8 on: February 19, 2007, 03:42:15 PM »
Thanks!!

Flis