NEWPIC.C Last Update: April 25/92 Chris Herborth (GEnie: C.HERBORTH) Introduction ~~~~~~~~~~~~ NEWPIC is a rather specific program that I whipped up one day (that's why the code is pretty hairy... it was worse!) when I got sick of looking at the same old picture on my desktop. The ACC I was using, Desktop Picture by Noud van Kruysbergen, would automatically load a file called DESKTOP.PI3 or DESKTOP.PC3 if it found it in the root directory of your boot disk. NEWPIC was designed to copy a random picture from my picture directory to the root of my hard drive, so I could have a different picture each time. This Version ~~~~~~~~~~~~ This version was whipped up for use with Warp-9, the CodeHead's new (and much improved) version of the old Quick ST screen accelarator. One of the local BBS crowd bought a copy at the recent Toronto ACE show, and knew I had something like this working. After he told me what file Warp-9 wanted, I hacked my original, and made this. As it is now set up, NEWPIC.PRG will look in C:\PIC for *.PC3, and copies the chosen file to C:\STHIGH.PC3, which Warp-9 will load when it boots. What'll it do for me? ~~~~~~~~~~~~~~~~~~~~~ Even if you don't use Warp-9, you can use NewPic. Originally, it was set up for Desktop Picture. Another version was given to Ed Krimen for use with NeoDesk. By changing the filespec and the destination file, you could use this to select a random sample to play at boot time (if you use Dave Baggett's PLAY program), or play a random MOD file if you use one of those STe/TT background MOD players. Use NewPic any time to want a random file copied to a specific place every time you run it. Custom Configurations ~~~~~~~~~~~~~~~~~~~~~ I was working on a nice GEM program to set up NewPic easily, but I've never gotten around to finishing it.... ;-) Instead, I've just included the source code for your enjoyment. Near the beginning of the program are three constants, THE_PATH, THE_SPEC, and THE_FILE. By changing these, you can customize NewPic for your setup. THE_PATH The source directory for the files. THE_SPEC The filespec for files (ex, C:\\PIC\\*.PC3 for Degas High-res pictures in the C:\PIC directory). Since I'm lazy, this also has to include THE_PATH in it. THE_FILE The destination path/file for the randomly selected file. Be sure to use \\ instead of \ in the path specifications, or the C compiler will eat them when you compile it again. After changing the paths and filenames to match your setup, recompile the source with your favourite C compiler. The source should work without modification on any compiler, but you'll have to add prototypes for ANSI compilers (like GCC). OK, now what do I do? ~~~~~~~~~~~~~~~~~~~~~ To pick a new picture every time to reboot, drop NEWPIC.PRG into your AUTO folder. You can also run it from the desktop, but it'll look gross, since I don't know any fancy tricks for making AUTO/normal/ACC all-in-one programs... Why does the source code look so weird? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file looks a little weird, full of {{{ and }}} lines... These are the folding fences used by Origami, one of the best programmers text editors around. The keys can be bound quite a few ways too... Very flexible! Copyrights and Stuff ~~~~~~~~~~~~~~~~~~~~ This program is FREEWARE. You can distribute it all you want, just keep all three files (NEWPIC.TXT, NEWPIC.C and NEWPIC.PRG) in the same archive. If someone wants to steal this idea :-) and write a much better program, with a nice setup utility, go for it. It'd be really nice if you mentioned my in your program somewhere though! Maybe the CodeHeads will whip up a cute little version of this for Warp-9... It'd be nice if they left in the ability to configure the program to do anything though... Warp-9 is a copyright of CodeHead Technologies. Degas Elite was a copyright of Batteries Included before they vanished. Desktop Picture is copyright Noud van Kruysbergen, but it's freeware, too.