Life of Muff

Friday, September 22, 2006

Randomize Your Destop Background

Can't choose which desktop background you want? Or perhaps you get sick of your background after a just a few days? Here's your solution: randomize your desktop background!

I actually fit into both of the above categories. That prompted me to write a short script to change the background on startup. All you need to do is place the script in the same folder as your backgrounds, and add a shortcut in the startup folder. The only restraint is that it will only work with BMP files.

Here's what to do:

1) Save this file into the directory where your BMP backgrounds reside.

2) Create a shortcut to the file and put that shortcut to the Startup folder. Done!

Now, everytime you load Windows a BMP background will be randomly selected from the directory that the script resides.

For the developers, here's the source:

' VBScript Source File
' NAME: alternateBG.vbs
' AUTHOR: Mark Lee
' E-mail:
' DATE : 23/10/2005
' COMMENT: Alternate the desktop background image.
' Place this script in a directory with two or
' more BMP images. When run, this script will
' randomly select one of these BMP images and
' set it as the desktop background. Place a
' shortcut to this file in the Startup folder
' to change the background each time you boot.

Dim WshShell, dimensioned, pics(), Wallpaper
Dim FSO, folder, file, files, i

Set WshShell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set folder = FSO.GetFolder(WshShell.CurrentDirectory)
Set files = folder.Files

dimensioned = False

For Each file in files
If Lcase(Right(file.Name, 3)) = "bmp" Then

If dimensioned = False Then
ReDim Preserve pics(0)
dimensioned = True
ReDim Preserve pics(UBound(pics) + 1)
End If

pics(Ubound(pics)) = file.Name

End If

Wallpaper = "HKCU\Control Panel\Desktop\Wallpaper"
SetBGPic(pics(Int((Ubound(pics) + 1) * Rnd)))

Set FSO = Nothing

Function SetBGPic(picname)

WshShell.RegWrite Wallpaper, WshShell.CurrentDirectory & "\" & picname, "REG_SZ" "RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters"

End Function

Saturday, September 09, 2006

Too many ads, not enough content!

Advertising on websites is becoming more and more prominent. Some websites are taking it way too far, and it's mostly the big name sites that are likely to be filling their pages with ads.

Take for example this article from PC Magazine that I found at Digg (no doubt reached the front page due to 'encouraged' diggs). Have a look at the screenshot to the right - that's the article. See that part highlighted in green? That's the main content of the article. Yep - a whopping 4.5% of the page! And that's not even the full article, the rest of it is linked to on other ad-saturated pages.

There is a total of 21 ad spaces on this site which accomodates around 55% of the page. Around 15% of the page is dedicated to site header and navigation, and the rest is whitespace (in accordance with the screenshot on the right).

Worse still, take a look at this screenshot (below) of how the site looks in a browser on a computer with a widescreen. As you can see, the page only stretches across half of the screen, leaving a hell of a lot of whitespace. Horrible! If you're going to leave big chunks of whitespace on your page then at least center the page, please!

Now I'm no bigshot when it comes to site design, but this just seems ridiculous. A site such as PC Magazine should be at the forefront of good site design, but this is just hell.