Paste: untested
Author: | rand |
Mode: | factor |
Date: | Thu, 7 Jan 2010 13:35:11 |
Plain Text |
USE: io.directories.search
<PRIVATE
SYMBOL: counter
counter 0 swap set
PRIVATE>
: my-pictures
home "\\My Documents\\My Pictures" append
{ ".jpg" ".png" ".bmp" ".tiff" } find-by-extensions ;
: circular-item
[ dup length ] dip swap mod 1 - swap nth ;
LIBRARY: winapi
FUNCTION: bool SystemParametersInfo
fWinIni ) ;
: change-wallpaper
[ SPI_SETDESKWALLPAPER 0 ] dip 0 SystemParametersInfo ;
: next-picture
counter get circular-item ;
: switch-wallpaper-every
[ my-pictures '[ _ [ next-picture change-wallpaper [ 1 + ] change-counter ] unless-empty ] ] dip every drop ;
: run-me
5 seconds switch-wallpaper-every ;
Author: | rand |
Mode: | factor |
Date: | Thu, 7 Jan 2010 13:50:44 |
Plain Text |
CONSTANT: SPI_SETDESKWALLPAPER 20
New Annotation