topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Sunday December 15, 2024, 3:40 pm
  • Proudly celebrating 15+ 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 8172 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 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: 402
  • Hello dude!
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #1 on: February 12, 2007, 02:49 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 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: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #3 on: February 12, 2007, 07:35 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: 73
    • View Profile
    • Donate to Member
Re: IDEA: Graphic Countdown with Random Reset
« Reply #4 on: February 12, 2007, 11:07 PM »
You can find the program at http://dcmembers.com...ntDown/CountDown.rar
Source code is available at http://dcmembers.com...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 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 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: 933
    • 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 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%
    }
  }
}
« Last Edit: February 13, 2007, 12:12 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 PM »
Thanks!!

Flis