ME» ÞChange Background on startuppic¬f×R4¡â@.^?ÿÆø3ã?Ô(éÿï? Ÿâ@ÀÌâ@[-------------------------------------------------------------------------------------------T' Requires Macro Express v 3.5 or laterT[-------------------------------------------------------------------------------------------TEGeneral note: comments are placed ABOVE the line(s) they refer to :-)T³TFT7N1: Counter for number of jpg files in source directoryT}0TyT1: String vector for storing jpg file numbers for checking later when we randomize (want to make sure it is a jpg file!)T|T6T3: Used to store temorary padded value of file numberT|TDT4: Source file path (where the jpg's are stored - must set this!!!)T|HC:\Documents and Settings\Jim\My Documents\My Pictures\For ScreenSaverF%T4%Path to My DocumentsT|%T4%\My Pictures\wallpaperT…TTF%T4%T€TF1TIN4: Length of current filename, used to check to see if it ends in ".jpg"T} T?Trim all but last 4 chars and check to see if it ends in ".jpg"T€TF4T T1FT‰ T-1.jpgTHIf the file is a jpg file, add the file number to the string vector (T1)T€T 6TT/T†TT}0TqThis is an endless loop, repeating until the random file number is in the string vector, meaning it is a jpg fileT„N1T1T}%N1%T}0T…TTF%T4%T€TF1TIN4: Length of current filename, used to check to see if it ends in ".jpg"T} T‰NNT?Trim all but last 4 chars and check to see if it ends in ".jpg"T€TF4TiSave filename before we trim and check to see if it is a jpg (we need this if it's valid so we can copy!)T|%T2%T T1FT‰ T-1.jpgT€T 6T/T:Is this file number in the vector (T1)? If so, it's valid!T‰TTTpThis should be where the backgrounds are stored by default on WinXP, if not, change it to where they ARE stored!T.C:\WINDOWS\Web\WallpaperT0FF random.jpg%T4%\%T5%TØ0000060000000C:\WINDOWS\Web\Wallpaper\random.jpgTQ)F1C:\WINDOWS\Web\Wallpaper\random.jpgTˆT†T‡T&Random file is not a jpg, keep trying!TôT†T†TTTRandom Desktop Background Jim Sabean What it does: Sets the Desktop Background image to one of several .jpg files. To install: Download the macro file umrandombackground.mex and save it to your hard drive in the folder where you store your macro file(s). Import the macro into your existing macro file by clicking File | Import | Macros. To use: This is a scheduled macro that runs automatically when Macro Express is loaded. You may want to adjust the schedule so it will run at certain time interval or when your computer is idle. Before using, you will need to create a folder named 'wallpaper' in your My Documents\My Pictures folder or modify the macro to use another folder. Put several .jpg files into the newly created folder. How it works: This macro will randomly select a .jpg files from your "My Documents\My Pictures\wallpaper" folder and sets the desktop background to that image. It does this using the "Repeat With Folder" and "Set Desktop Wallpaper" macro commands. Limitations: This macro was written to run on Windows XP. If you are using another version of Windows you may need to change the macro to include the folder where that version of Windows stores the desktop background or wallpaper files. As written, this macro will only use .jpg files. You may want to revise it to also allow the use of .bmp files. Requirements: - Macro Express 3.5 or later Submitted by: Jim Sabean ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- See comments in script for notes on how to personalize and use this macro. You will have to set a directory for your picture files, so do not run before modifying the macro! If you like this macro, and would like some personal or professional macros developed for you, please contact me. - Jim Sabean ThatJimGuy2003@direcway.com ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \Bp B