Short: Timer controled Slideshow-like random WBPattern change. Uploader: Roland Heyder Author: RhoSigma, Roland Heyder (Germany) Type: util/wb Version: $VER: RandomWBPatt 4.231 (19.08.02) Requires: OS 3.0 (v39+), util/libs/ExtraLib.lha english: ¯¯¯¯¯¯¯¯ EMAILWARE - Please tell me what you think about this piece of Software ;-) This small CLI-Program changes the file-entries within ENV:sys/WBPattern.prefs every given period of time. This automaticly forces IPrefs to refresh the WB to use the new pictures as background. Installation: - Copy the program (RandomWBPatt) to C: (SYS:c) - Create the files 'SYS:Prefs/Presets/PatternFiles-WB' and 'SYS:Prefs/Presets/PatternFiles-WIN' which contain a listing of all Image-Files (incl. Paths) which you decide to use as patterns for either Workbench and/or Windows. In the very first line of that files you must place the number of files listed within the file. Take a look to the supplied sample file, if you are unsure. (see also History changes for v4.231) - Note: You also need util/libs/ExtraLib.lha from Aminet Usage: Use from CLI only !! RandomWBPatt ONCE/S WBONLY/S WINONLY/S TIMER/K PEN/K ONCE - Set just one time new backgrounds and then quit immediatly WBONLY - Change only Workbench-Background WINONLY - Change only Windows-Background TIMER - followed by a max. 4-digit number, which gives the period of time in minutes, after every time it is elapsed the new background is set PEN - followed by a max. 3-digit number in the range 0-255, which specifies the color used for outputs (see Notes) - If specified both, ONCE and TIMER, ONCE has higher priority !! - If specified both, WBONLY and WINONLY, WBONLY has higher priority !! - If specified no ONLY-Option, then both backgrounds are affected. - If no Option is given, the defaults used are TIMER=30 PEN=3 - If you don't use ONCE, use 'Run >NIL: RandomWBPatt Options' i.e. if you start the program within S:User-Startup. - you may quit the program using the CLI-Command 'Break' by sending a CTRL-C to it, the program then quits within the next minute - you also can send a CTRL-F, which forces RandomWBPatt to break its time cycle and load a new background immediatly (well, within the next minute) Notes: The program creates another two files called 'PatternFiles-WB.done' and 'PatternFiles-WIN.done' which list all Image-Files which were already shown. The random engine uses these files to avoid Image-Repeats until every image is shown at least one time. The PEN-Option is only useful if you are using a 800x600 WB-Screen and if you also have installed and started StopMenu. In this case you must also copy the three .info-Files to STOPMENU:icons/program and then let yourself surprise what happens after RandomWBPatt is started. See also my other Software on Aminet: util/libs/ExtraLib.lha dev/basic/MBPrefs.lha deutsch: ¯¯¯¯¯¯¯¯ EMAILWARE - Bitte teilt mir eure Meinung über dieses Programm mit ;-) Dieses kleine CLI-Programm schreibt jeweils nach einer angegeben Zeitperiode neue Bilddateinamen in die Datei ENV:sys/WBPattern.prefs, was IPrefs auto- matisch dazu bringt, diese als neue Hintergründe anzuzeigen. Die Bilder werden zufällig aus einer vorgegebenen Liste von Dateinamen ausgewählt. Installation: - Kopieren Sie die Programmdatei (RandomWBPatt) nach C: (SYS:c) - Legen Sie die Datein 'SYS:Prefs/Presets/PatternFiles-WB' und 'SYS:Prefs/Presets/PatternFiles-WIN' an, die alle Bilddateien (incl. Pfad) auflisten, welche Sie als Hintergrund für die Workbench bzw. Windows verwenden wollen. In der ersten Zeile der Dateien muß jeweils die Anzahl der in der Datei gelisteten Bilder stehen. Sehen Sie sich die mitgelieferte Datei an, falls Sie sich unsicher sind. (siehe History Veränderungen ab v4.231) - Achtung: Sie brauchen util/libs/ExtraLib.lha aus dem Aminet Benutzung: Nur vom CLI aus !! RandomWBPatt ONCE/S WBONLY/S WINONLY/S TIMER/K PEN/K ONCE - Setze einmal neue Hintergründe und beende dann sofort WBONLY - Setze jeweils nur neuen Workbench-Hintergrund WINONLY - Setze jeweils nur neuen Windows-Hintergrung TIMER - gefolgt von einer max. 4-stelligen Zahl, die die Periode in Minuten angibt, nach der jeweils ein neuer Hintergrund gesetzt werden soll PEN - gefolgt von einer max. 3-stelligen Zahl zwischen 0-255, die die zu verwendende Schriftfarbe angibt (s.Bemerkung) - Sind ONCE und TIMER angegeben, dann hat ONCE Priorität !! - Sind WBONLY und WINONLY angegeben, dann hat WBONLY Priorität !! - Ist keine ONLY-Option angegeben, werden beide Hintergründe gesetzt. - Wird gar keine Option angegeben, gilt TIMER=30 PEN=3 - Wird kein ONCE verwendet, dann sollten Sie das Programm mittels 'Run >NIL: RandomWBPatt Optionen' asyncron starten, z.B. wenn Sie es von der S:User-Startup aus starten wollen. - Sie können das Programm beenden, indem Sie mit dem CLI-Befehl 'Break' ein CTRL-C Signal an dieses senden, das Programm beendet dann innerhalb einer Minute. - Sie können auch ein CTRL-F senden, was RandomWBPatt dazu bringt, den aktuellen Time-Zyklus zu beenden und sofort einen neuen Hintergrund zu laden (o.k. ja, kann auch bis zu einer Minute dauern) Bemerkung: Das Programm legt selbst noch die zwei Dateien 'PatternFiles-WB.done' und 'PatternFiles-WIN.done' an, in der alle bereits einmal angezeigten Bilder vermerkt werden. Der Zufallsgenerator benutzt diese Datein, um Bild-Wiederholungen zu vermeiden, bis alle Bilder mindestens einmal angezeigt wurden sind. Der PEN-Parameter ist für Sie nur von Interesse, wenn Sie erstens einen 800x600 Pixel großen WB-Bildschirm verwenden, und zweitens StopMenu installiert ist und auch gestartet ist. Kopieren Sie in diesem Fall noch die drei .info-Dateien nach STOPMENU:icons/program und lassen sich überraschen, was nach Start von RandomWBPatt passiert. Werfen Sie doch auch mal einen Blick auf meine andere Software im Aminet: util/libs/ExtraLib.lha dev/basic/MBPrefs.lha ----------------------------------------------------------------------------- History: ¯¯¯¯¯¯¯¯ v3.089 (30.03.02) - First public release v3.222 (10.08.02) - Random generator reworked: As more pictures from the given list were already shown, as longer it takes for the random generator to get a hit on an still unshown picture, finally ending up in an endless loop causing heavy disk activity. Now after a maximum of 100 random tries, the generator is switched to sequencial mode to find the few remaining unshown pictures. - Got one mail until today, somebody was asking for a GUI/FileRequester to create the 'SYS:Prefs/Presets/PatternFiles' list-file. Is it really needed ?? - I simply use the Shell-CMD 'List [ALL] FILES LFORMAT %F%N' to create the listing. Using redirection '>' to a file or append re- direction '>>' to add the listing to an already existing list-file. After that load the file into an editor tool with line counting ability (most of modern editors can do this) adding the line count at the head of that list and save it again. Altogether it takes me less than one minute to create a listing of a complete directory. So why a GUI ?? v4.231 (19.08.02) - Major change for this Version is the splitting of the old list file 'SYS:Prefs/Presets/PatternFiles' to the files 'PatternFiles-WB' and 'PatternFiles-WIN' which hold the Image-Listings for the corresponding WBPattern-Settings 'Workbench' and 'Windows' - Minor changes: some more enhancements on random generator code and CTRL-C/F handling.