DX Request: Reminder widgit

Thursday, July 23, 2009 by ZubaZ | Discussion: DesktopX

I am in need of a widget that I can set for X minutes in the future and at the end of that time it plays a sound and/or changes teh image (new image, larger image, flashing image?).  I didn't see anything in the gallery.  THis is the closest I saw: https://www.wincustomize.com/skins.aspx?skinid=3176&libid=3

Specs:

  • Mandatory
    • Set the time (a form to enter number of minutes)
    • Alert at end time (grow/glow/sound?)
  • Nice to have
    • Multiple timers
    • Ability to label timer
    • Ability to set the image
    • Ability to set the sound
    • (added) Preset minutes (1, 5, 10, 15, 30)

Thanks a bunch!

Richard Mohler
Reply #1 Thursday, July 23, 2009 11:26 AM

Tiggz didn't make anything like that?

ZubaZ
Reply #2 Thursday, July 23, 2009 11:28 AM

The galleries don't have the best searches so he might have integrated it into some amazingly fancy clock . . but I don't need a whole clock. 

Philly0381
Reply #3 Thursday, July 23, 2009 11:41 AM

Have you checked RomanDA's stuff?

ZubaZ
Reply #4 Thursday, July 23, 2009 11:50 AM

Philly0381
Have you checked RomanDA's stuff?
Yes, then I sent him a PM 

RomanDA
Reply #5 Thursday, July 23, 2009 11:51 AM

This should be pretty simple.. if you can hold a day or so ill look into it.

ZubaZ
Reply #6 Thursday, July 23, 2009 11:57 AM

RomanDA
This should be pretty simple.. if you can hold a day or so ill look into it.
You are a rock star!

 

More nice to haves:

  • Preset minutes (1, 5, 10, 15, 30)
RomanDA
Reply #7 Thursday, July 23, 2009 1:34 PM

ok, worked out the basic code..

Code: vbscript
  1.  TimerVal = 2 '2 minutes for the countdown
  2.  TStart = Time() ' Get current time
  3.  TEnd = DateAdd("n",TimerVal,Time())  'Add the timerval to the current time

This is the basic info. Get the timervalue = 2 mins to countdown

Then hold the current time, and the time + this timervalue

 

From here you can setup a timer to check to see if the current time > the TEnd time.

Code: vbscript
  1. Sub Object_OnTimer1
  2.  Call ShowTime() ' function i made to show the time "counting down"
  3.  If Time() > Tend Then
  4.      object.State = "Done" ' change the state of the base object to one that looks different and has a SOUND with it
  5.      desktopx.object("DXTimer_Text").text = "TIMES UP" ' change the text of the display to show the timer is up
  6.      object.KillTimer 1 'kill the timer
  7.  End If
  8. End Sub

The rest is really setting up all the nice things for the user:

Things like a Start Btn - in my case i made it so when you click th btn it prompts for the time in mins to countdown, then it starts the timer.

Edit btn maybe

Info to show on the widget

whatever else you might want to add.

I made this pretty simple.

 

 

ZubaZ
Reply #8 Thursday, July 23, 2009 2:12 PM

Thanks man . . you are a master (at easy stuff). 

RomanDA
Reply #9 Thursday, July 23, 2009 2:18 PM
RomanDA
Reply #10 Thursday, July 23, 2009 2:53 PM

Keep in mind what i uploaded is VERY simple, and does the basic thing wanted (counts down and beeps).  So.. if you want to add to it, go for it. 

ZubaZ
Reply #11 Thursday, July 23, 2009 2:57 PM

I modified the sound to loop and added a mousedown state to turn it off.  Awesome!

ZubaZ
Reply #12 Thursday, July 23, 2009 3:04 PM

Next step, on state chage to Done, make the widget change z-order to always on top

 

Apparently

object.State = "Done"
     Object.OnTop

is fail

RomanDA
Reply #13 Thursday, July 23, 2009 4:32 PM

Zu.. been trying to make THAT work for about 4 years.

sViz
Reply #14 Thursday, July 23, 2009 5:36 PM

Yeah object.ontop does not work. Widget.Ontop does, though.

 

Oh, and great work Roman.

ZubaZ
Reply #15 Friday, July 24, 2009 10:17 AM

Widget.ontop working.

Next on list . . a cancel and a close.

Jafo
Reply #16 Friday, July 24, 2009 10:34 AM

Thanks man . . you are a master (at easy stuff).

Just say the word, Dave....I'll give him a wee slap....

Littleboy
Reply #17 Friday, July 24, 2009 10:55 PM

The digital clock docklet would be perfect for that (if it wasn't crashing DockletX on start ). I'll let you know if I manage to make it work properly (I should have some time during my vacation next month).

RomanDA
Reply #18 Saturday, July 25, 2009 8:39 AM

Just say the word, Dave....I'll give him a wee slap...

the word is given

Jafo
Reply #19 Saturday, July 25, 2009 11:25 AM

the word is given

OK, lad...I'll be seeing him mid September....shall greet him with a fist....

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01