Scripts, tutorials, and general Desktop X help
Published on December 5, 2009 By sViz In OS Customization

 

 

And now we come to the very last edition of I Love DesktopX. I have to thank all of you who’ve read, commented, and featured this series of articles, because I just wouldn’t keep doing it without you guys support.

 

This being the biggest month for the holidays, below I’ve decided to feature seasonal skins from the past month. But if you’re not feeling the Christmas cheer yet, we’ve also got 3 non-seasonal skins for you to deck the halls with.

 

 

 

 

 

 

 

Santa Clock by Doubird

 

 

I had Doubird’s Anticko clock up all last month, and it looks like I’ve found my new clock of choice for December. It’s a simply designed clock with a lovely Christmas scene that will bring holiday cheer to your desktop. Makes me want to listen to old nostalgic Christmas songs.

 

 

 

 

 

Happy Effin' HO HO by happycamper88 

 

I can totally see anyone having a dismal holiday season getting a kick out this. It’s a bit icky for my desktop, but I find it hilarious nonetheless.

 

Merry Christmas? Bah effin’ humbug!

 

 

 

 

 

WC Community Holiday Suite '09 - Countdown Weather  by Island Dog 

 

 

 

This countdown gadget is made to match the 2009 Wincustomize Community Holiday Suite of skins. Keep track of how many days before Santa arrives, how many days before you find out what presents everyone got you, or how many days you have left to finish your Christmas shopping. Either way, this is a handy gadget to have, and it takes up very little space on your desktop.

 

Check out the matching DX desktop, weather, and the full community suite here: LINK

 

 

 

 

Clear View by Richard Mohler 

 

 

This is an updated version of the popular Clear View widget. It’s extremely minimal in design, and I love that it takes up so little space. For such a small package you get all your basic tools including weather, clock, media, and system info.

 

As you might expect with a clear widget, it goes well with pretty much everything.

 

 

 

 

Hanukkah and Friends DX by Redneckdude

 

 

I love this beautiful theme. Nice balance of colors, minimalistic design, easy on the eyes and great on the desktop.

 

You can get the matching weather widget here: LINK

Find the whole suite here: LINK

 

 

 

 

R 001  by BoXXi 

 

 

It’s not all that often you find a killer theme in purple, but if anyone can pull it off it’s definitely Master BoXXi. The original theme was by another author, but I’m glad BoXXi recreated it for DX. Simply put, this theme is the awesome sauce. It’s packed full of user and system shortcuts, system info, and a wallpaper changer, all in one striking layout.

 

Resolution dependant: 1680 x 1050

 

 

 

 

Digital Clock Using Images

 

 

 

 

Sometimes fancy font just doesn’t cut it, especially when you want to make your clock 3D. Making a digital clock with images isn’t as complicated as you might think. We just need about dozen images and a small script.

 

First you’ll create your images, the digits 0 through 9. You will also need a colon, AM, and PM image. Here are some of the ones I used.

 

 

 

 

The first object we’ll create in DesktopX is the first digit—the ‘1’ in 12:00.

 

Create a new object. Then add 4 states: “none”, 0, 1, 2. (Why 0 or 2? Because you might want to do a 24 hour clock, in which case you’ll need them for 0600 hours or 2100 hours.)

 

Apply your images to each state. For the “none” state, leave the image field blank. You can delete the Mouse Away or Default state if you like. 

 

 

Create another object for the second digit. Add the states: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Apply your images to each state.

 

 

 

To save time and energy, clone digit 2 twice for the third and fourth digits. Then, create another object for the am/pm sign. Add the states: “am” and “pm” and apply your images.

 

Lastly, create your colon object and Group all.

 

 

On to the script. 

 

 

Code: vbscript
  1. Dim timefrmt : timefrmt = 3   'Called when the script is executed
  2. Sub Object_OnScriptEnter
  3.  Object.SetTimer 1,1000
  4. End Sub  
  

  

 

Code: vbscript
  1.   Sub Object_OnTimer1
  2.  t = FormatDateTime(Now(), timefrmt) 'get the time
  3.  tparts = split(t,":") 'parse the time
  4.  
  5.  If timefrmt = 3 Then
  6.   phr = tparts(0) 'parse hours
  7.   pmin = tparts(1) 'parse minutes
  8.   psec = tparts(2) 'parse seconds
  9.   psecparts = split(psec, " ")
  10.   ampm = LCase(psecparts(1)) 'parse am/pm from the seconds
  11.  
  12.   '>>>>  Set States
  13.   If Len(phr) = 2 Then DesktopX.Object("clock_digit1").state = Left(phr,1) Else DesktopX.Object("clock_digit1").state = "none"
  14.   If Len(phr) = 2 Then DesktopX.Object("clock_digit2").state = Right(phr,1) Else DesktopX.Object("clock_digit2").state = phr
  15.   DesktopX.Object("clock_digit3").state = Left(pmin,1)
  16.   DesktopX.Object("clock_digit4").state = Right(pmin,1)
  17.   DesktopX.Object("clock_ampm").state = ampm '<<<<
  18.  
  19.  ElseIf timefrmt = 4 Then
  20.   phr = tparts(0) 'parse hours
  21.   pmin = tparts(1) 'parse minutes
  22.   If phr => 12 Then ampm = "pm" Else ampm = "am"
  23.  
  24.   '>>>>  Set States
  25.   DesktopX.Object("clock_digit1").state = Left(phr,1)
  26.   DesktopX.Object("clock_digit2").state = Right(phr,1)
  27.   DesktopX.Object("clock_digit3").state = Left(pmin,1)
  28.   DesktopX.Object("clock_digit4").state = Right(pmin,1)
  29.   DesktopX.Object("clock_ampm").comments = ampm '<<<<
  30.  End If  alignText
  31. End Sub  
 

 

Code: vbscript
  1. Function alignText
  2.  textalign = "center"
  3.  
  4.  If textalign = "center" Then
  5.  
  6.   DesktopX.Object("clock_digit3").left = DesktopX.Object("clock_colon").right
  7.   DesktopX.Object("clock_digit4").left = DesktopX.Object("clock_digit3").right
  8.   DesktopX.Object("clock_digit2").right = DesktopX.Object("clock_colon").left
  9.   DesktopX.Object("clock_digit1").right = DesktopX.Object("clock_digit2").left
  10.  
  11.  ElseIf textalign = "left" Then
  12.  
  13.   DesktopX.Object("clock_digit2").left = DesktopX.Object("clock_digit1").right
  14.   DesktopX.Object("clock_colon").left = DesktopX.Object("clock_digit2").right
  15.   DesktopX.Object("clock_digit3").left = DesktopX.Object("clock_colon").right
  16.   DesktopX.Object("clock_digit4").left = DesktopX.Object("clock_digit3").right
  17.  
  18.  ElseIf textalign = "right" Then
  19.  
  20.   DesktopX.Object("clock_digit3").right = DesktopX.Object("clock_digit4").left 
  21.   DesktopX.Object("clock_colon").right = DesktopX.Object("clock_digit3").left 
  22.   DesktopX.Object("clock_digit2").right = DesktopX.Object("clock_colon").left
  23.   DesktopX.Object("clock_digit1").right = DesktopX.Object("clock_digit2").Left
  24.  
  25.  End If
  26. End Function
 

 

  

 

 

The script consists of three simple functions. The first thing is to get it to show the correct time. As always, we use FormatDateTime to get the current system time. To show 24 hour, change the timefrmt value at the top to 4. To show 12 hour, change the timefrmt value to 3.

 

On the 1-second timer, we splice up the time and set each corresponding object’s state to the correct digit.

 

Unlike with a text clock, we have to line up the objects manually. So we create an alignText function. I’ll spare you the details, but you can align left, right, or center by changing the textalign value. Obviously, you would need to make adjustments to positioning depending on the images you use.

 

 

That's all there is to it. The example dxpack is here: LINK

 

 

 

 

Thanks for reading and happy DXing!


Comments (Page 1)
2 Pages1 2 
on Dec 05, 2009

Thanks again!

on Dec 05, 2009

Eve, you do mean the last edition of 2009, right. Please tell me it's not THE last edition EVER!!!  

 

That said, thanks for the awesome job, the interesting interviews, and for all the scripts and templates.

Thanks for all the spotlights, of my work, and of other's. Congrats to all the spotlightees!

on Dec 05, 2009

Thanks, sViz, though it isn't a happy thing to put such a popular series to bed...

Happy Holidays to you! Hope they bring you much Joy!

 

on Dec 05, 2009

An interesting read, as always

on Dec 05, 2009

Please tell me it's not THE last edition EVER!!!

Ditto. Thanks for some very enlightening reading. We need articles like this to keep the DX fires burning. The imagination,talent and effort of all you DX'ers deserves recognition.  

Great choices again,btw!

on Dec 05, 2009

Nice job..

on Dec 05, 2009

Thanks for reading everyone.

No, it's not the last ever. But it's the last edition for now. I can't say I'll be able to do the articles as often next year, but we'll see how it works out.

Thanks again, everybody.

on Dec 05, 2009

thanx for this Eve. always good to read...xx

on Dec 06, 2009

Thanks a lot for all the great articles, interviews, and the advancement of DesktopX. I hope this isn't a farewell.

on Dec 06, 2009

Well done Eve, the series has been very informative and well written. Kudos for keeping up the community spirit and DX awareness.

on Dec 06, 2009
Thanks for including my Effing' clock!   

I sure hope you keep doing these articles sViz, they are great.

Merry Christmas -or- Happy Effin' HoHo : Whichever you prefer.
on Dec 08, 2009

ahh. another great one! thanks!

on Dec 13, 2009

Thanks all.

on Dec 14, 2009
very informative article - who knows i might even get brave and have a go myself lol
on Dec 21, 2009

Hey Eve how can I change the spacing between the numerical images?I went to a smaller image.

Thank you

Harley

2 Pages1 2