WallpaperChanger v1.20 (c) 1995 Steffen Kaiser & Rolf Roßius INTRODUCTION This program enhances WindowsTM 3.1(1) by randomly changing of the desktop picture. DISCLAIMER (standard disclaimer) "The WallpaperChanger program is supplied as is. The authors disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The authors assume no liability for damages, direct or consequential, which may result from the use of the WallpaperChanger." Will sagen: Die Autoren übernehmen keinerlei Gewährleistung für dieses Programm und sind für keinerlei durch das Programm entstandene Schäden, ob direkt oder indirekt, haftbar. This program is Freeware, you may use it without registration or payment, but it is permitted to alter any files shipped in this package. You may include these files into any other package or include any file into this package as long as the resulting package is Freeware. Please distribute widely. CHANGES SINCE VERSION 1.1 ø Support of private INI files, either by the file "chgwall.ini" within the Windows directory or by a "IniFile=" line within the section "[WallpaperChanger]" within the file "win.ini". CHANGES SINCE VERSION 1.01 ø Support of initial settings of the [WallpaperChanger] section within the WIN.INI file. ø Remove the text window. ø Start the program iconic. ø Optional run hidden. ø By improving the specification for pictures it is possible to view any picture format, which Windows can handle itself; e.g. some BMP and RLE formats. ø Errors are displayed within a message box. ø More options. THE PACKAGE chgwall.exe the executable chgwall.ini an example for a private INI file chgwalle.wri this English text file chgwall.txt the German version of this file History the history of this program INSTALLATION If you want to store the initalization paramaters of WallpaperChanger INTO the file WIN.INI, you MUST NOT copy "chgwall.ini" into the Windows standard path. If you don't want to use neither "chgwall.ini" nor "win.ini" within the Windows standard directory, you allthough must create a section "[WallpaperChanger]" in one of the files with an entry "IniFile=", where "" stands for the name of the INI file you want to use. Copy the file "chgwall.exe" into your favorite directory and run "chgwall initialize". This will create the following lines in the file "win.ini": [WallpaperChanger] Directory= ; Base directory of picture files Time=3600 ; change time in seconds Restart=Reinit ; what 2nd instance is to do: quit, stop, go, toggle, reinit Hide=No ; Hide icon after start (Boolean) Info= ; Writes info into this file (none) IniFile= ; other INI file errRetry=10 ; retry # pictures, if load failed Delayed=No ; Change the first time immediatly after program start ChkMaximized=0 ; check for maximized application each #th picture (disabled)" Mask1=*.bmp ; Mask for picture files, can contain paths MaskDelete=No ; Delete all entries beginning with "Mask" ;MaskTime= ; overrides Time= Now, alter the values according your needs, the lines have these meanings: "Directory": Base path to the pictures "Time": Time in seconds between to picture changes (Std.: 1h) "Restart": Contains the command line, which is used, if you start a second WallpaperChanger without command line. The values are described in the chapter COMMAND LINE OPTIONS (Std.: Reinit) "Hide": To hide WallpaperChanger after start; valid for "Yes" are: 1, Yes, On und True . (Std.: No) "Info": The name of the file, where some additional informations during the run of WallpaperChanger are stored. It is not needed for WallpaperChanger itself. If a file is opened, it remains open until WallpaperChanger is quitted. Even a "Reinit" makes no change to it. (Std.: none) "IniFile": Instead of the current INI file use another. If the path is not full-qualified, it is treated relative to the Windows path. This line is evaluated before and independed of all other lines. (Std.: none) (see RECURSION WITHIN THE INI FILES) "errRetry": If a picture could not be loaded, WallpaperChanger tries to load another one. To avoid an endless loop this line sets the amount of tried pictures. (Std.: 10) "Delayed": This line tells, if the first picture should be loaded after the lapse of "Time". This setting is ignored, when you run a second instance of WallpaperChanger. If you start WallpaperChanger automatically, either set this option to "No" or disable the background picture in Syscontrol|Desktop. Valid for "Yes" see "Hide". (Std.: Off) "ChkMaximized": If this option is set to a number unequal to zero, WallpaperChanger checks before the change of each #th picture, if an application runs full-screen. If so, WallpaperChanger is stopped. WallpaperChanger is resumed, until there is no application running full-screen or you commanded "go" or "reinit". (Std.: 0) "Mask": These lines are described in the chapter DYNAMIC INITIALIZE. Std.: means the standard setting, if the line does not exist or is invalid. NOTE If you omit any parameters to the "IniFile" line, it is ignored. If the INI file of the "IniFile=" line does not exist, or there is no section "[WallpaperChanger]" within, or within this section there is no entry, the standard INI file "win.ini" will be used. The directory within the "Directory=" line should be fully qualified, e.g. c:\windows\bilder. If that directory does not exist or is the line missed, the standard Windows path is assumed, that is the directory, where "win.com" resides. The time specified by "Time=" is rounded down to a multiple of 10. If you deiconify WallpaperChanger, an empty window is displayed. If an error occurs while loading WallpaperChanger, a message box pops up. You must click the OK button in order to quit WallpaperChanger. While this box is displayed, no other instance of WallpaperChanger can be started. START WALLPAPERCHANGER AUTOMATICALLY The simplest way is to add WallpaperChanger to the Autosatrt group of your program manager. Another possible way is to alter the "load=" line within the section "[windows]" of WIN.INI. Add " chgwall.exe" if the line already exists [Attention: The space is needed.] If the line does not exist, create it; then the space is not needed. e.g.: old line: [windows] load=c:\windows\appl\atm.exe new line: [windows] load=c:\windows\appl\atm.exe chgwall.exe Attention: If you use another windows loader, reffer its manual on how to add a new startup program. If Windows cannot locate the file "chgwall.exe" simply add the qualified path. e.g.: [windows] load=c:\windows\appl\atm.exe c:\windows\chgwall.exe when "chgwall.exe" resides in c:\windows. COMMAND LINE OPTIONS Maybe, their are unusual in Windows, but I cannot believe, you will use them often. Unless, there is a simple to use method by creating an icon in a program manager group for each option: 1. Open the destination group within the program manager; 2. Open the directory containing "chgwall.exe" in the file manager; 3. Drag the file "chgwall.exe" form the file manager into the program manager;& 4. Append the desired command line to the line by the File|Properties menu. Note: Although the multiple entries the file "chgwall.exe" resides only once on your hard disk, so no space is wasted. The command line options are case insensitive and you can specify only one at a time. If you start a second instance of WallpaperChanger, it will command the first instance, so you can run only one WallpaperChanger each time. Unless stated else, the options are ignored, if you load the first instance. Following options are supported: "quit": Quits WallpaperChanger. Specified at the first instance, prevents from loading it, so you can be sure, no WallpaperChanger is active. "stop": Stop WallpaperChanger. "go": Resume WallpaperChanger, the former settings are preserved. This will perform an out-of-time change of the background. "toggle": Toggle between "stop" and "go". "reinit": Cancel the current settings and reread them fromout WIN.INI. This is the default action of the first instance. "initialize": Write the initial lines into WIN.INI. You should not use them after installing WallpaperChanger, because all your individual settings get lost. "none": Clear the background and stop WallpaperChanger. If you use this option with the first instance, WallpaperChanger quits after the action. any non-matching strings: are treated as file names and get loaded. If an error occured, a error message box is displayed, telling so. If you use this option with the first instance, WallpaperChanger quits after the action. DYNAMIC INITIALISIZE Between the lines described in chapter INSTALLATION the following options exist: MaskTime=30 MaskDelete=Yes/No Mask1=*.bmp Mask2=*.rle Mask3=..\privat\*.* Mask4=e:\bilder\*.2 MaskIniFile=d:\windows\appl\chgwall.nt Where "MaskTime" replaces the value of"Time" and "Mask*" the standard search mask "*.BMP". This example states: Except 3600s change time use 30s. The pictures are not searched by the mask "*.BMP" in the standard Windows directory (the "Directory" line has no path in it), but by: ø *.BMP in the standard directory ø *.RLE in the standard directory ø all files in the directory "..\privat" relative to the standard path,& ø *.2 in the directory "e:\bilder" The "Mask*" lines must be numbered continuously, so they can be found. The option "MaskDelete" indicates, that all these lines starting with "Mask" must be deleted immeadiately after reading them. (Std.: No) "MaskIniFile" replaces the "IniFile" line and will be evaluated before and independed of all other lines.Therefore this line is deleted, even if the "MaskDelete" entry says something else. (see RECURSION WITHIN THE INI FILES) RECURSION WITHIN THE INI FILES The "IniFile" line enables recursions, e.g.: File WIN.INI: [WallpaperChanger] IniFile=chgwall.1 File CHGWALL.1: [WallpaperChanger] IniFile=chgwall.2 File CHGWALL.2: [WallpaperChanger] IniFile=. "IniFile=." means, that WIN.INI shall be used, because you cannot use a file named ".". Without recursion checking the initialization would not finish. Therefore the time, at which the initialization begun, is written into each processed INI file. If WallpaperChanger hits a INI file containing that time stamp, it stops reading the "IniFile" line. In the above example, the initialization is controlled by the lines of WIN.INI. INFORMATION IN THE INFO FILE The start and each "ReInit" generate the following information in the file given by the "Info" line: #Starting changing wallpaper: ##Directoty=c:\windows\bilder\ ##Time=120s ### 11 pictures ready to show what means: Each 120 seconds WallpaperChanger alters the background with a randomly choosen picture. There are currently eleven pictures in the pool. While running: Change Wallpaper to c:\windows\bilder\myriam.bmp and some information, by altering the state of WallpaperChanger. FOR INTERESTED PEOPLE The first instance is commanded by messages: 401: Reinit 402: Go 403: Stop 404: Toggle 405: None 406: ViewFile; lParam contains "GlobalAtom" of the name, which is deleted. AUTHORS This is the follow-up of our first work. Allthough, we did not plan to make one and we abandoned MS Windows, we are proud to hack some ideas of the users in. Menus and nice formatted output are (and ever will be) still not supported, well, they seem unimportant for this job. Please forgive any of the thousands spelling and idiom mistakes. If you like to contact us: e-mail: Steffen.Kaiser@fh-rhein-sieg.de