Monthly Archives: March 2013

Hats

When you’re a Discordian, every hat is a pope hat.

When you’re a Discordian, every pope is a hat pope.

When you’re a Discordian, every hat is a pope.

When you’re an Erisian, every pope is a hat.

When you’re a Jet, you’re a Jet all the way.

When you’re a Marilyn, every hat is a dope hat.

When you’re a stranger, people are strange.

When you’re a Discordian, every pope is a strange hat’s dope Jet.

Sir Samelot

I love this town.

Display a random wallpaper on WinXP

Two files, ImageMagick, and a scheduled task.

Copy the following into files:

random.vbs:

'Run random.bat without displaying a window
CreateObject("Wscript.Shell").Run "random.bat", 0, True

random.bat:

@echo off
set img=
set len=0
for /f "delims=" %%a IN ('dir /b /s *.png') do (
set /a len+=1
)
if %len%==0 goto :END
set /a idx=%random% %% %len%
for /f "skip=%idx% delims=" %%a IN ('dir /b /s *.png') do (
set img=%%a
goto :BRK
)
:BRK
IMconvert "%img%" bmp3:random.bmp
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters 
:END
exit

Note: As you can see above, I renamed convert to IMconvert because of a well-known naming conflict.

  1. Place those two files in, I don’t know, maybe MyDocs/MyPics/Wallpapers or where ever.
  2. Add all kinds of PNG images to the folder from step one. Sub-folders are welcome.
  3. Run random.bat or random.vbs once to produce random.bmp.
  4. Set your wallpaper to random.bmp.
  5. In the Control Panel, you’ll find Scheduled Tasks. Make a new one and set it to random.vbs. Play around with the options for the task. I have mine set for logon, system idle, and at fixed times throughout the day.

That’s it. Enjoy!