home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: WPS_PM / WPS_PM.zip / dltabk.cmd < prev    next >
OS/2 REXX Batch file  |  1995-10-17  |  788b  |  18 lines

  1. /* 1.1 GWBarrowcliff Change Desktop background on the hour */
  2. /* 1.2 GWB Change the Desktop immediately when loaded, then on the hour after */ 
  3. /* Start it in the background with: start "Change Background" /b /c /min dltaback.cmd   */
  4. call RxFuncAdd 'SysLoadFuncs' , 'RexxUtil',  'SysLoadFuncs'
  5. call SysLoadFuncs
  6. /* Call SysSleep secs() */   /*  Wait until on the hour  */
  7. Call SysFileTree "C:\os2\bitmap\*.BMP" , "sorted" ,"o"
  8. do  until the_twelth_of_never=0
  9.   i = random(1,sorted.0)
  10.   say 'Time=' time("N") ||', Selected Bitmap=' sorted.i
  11.   result=SysSetObjectData("<WP_DESKTOP>",'BACKGROUND='||sorted.i)  
  12.   Call SysSleep secs()                   /*  don't let the drift catch you */
  13. end
  14. return
  15.  
  16. secs:
  17.   return(3600-(left(right(time("N"),5),2)*60+right(time("N"),2)))
  18.