• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Is there a program...

Status
Not open for further replies.

Ecrofirt

Member
Not the best solution, but here's HTML that will randomly generate an image. You could set this as an active desktop, and it'll randomly pick a background every time the page is loaded (which will happen when you reboot.)
Code:
<html>
<head>
<script language="Javascript">
<!--

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(10)
image[0] = 'desktopimage1.jpg'
image[1] = 'desktopimage2.jpg'
image[2] = 'desktopimage3.jpg'
image[3] = 'desktopimage4.jpg'
image[4] = 'desktopimage5.jpg'
image[5] = 'desktopimage6.jpg'
image[6] = 'desktopimage7.jpg'
image[7] = 'desktopimage8.jpg'
image[8] = 'desktopimage9.jpg'
image[9] = 'desktopimage10.jpg'


function ranimage() {
  var rand= Math.round(Math.random()*(image.length-1))
  return(image[rand])
}

document.write("<img src='" +ranimage()+ "'>")

//-->
</script>
</head>
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
</body>
</html>

Maybe someone will know how to get the scrollbars to not show up when you maximize it? I don't know if that's something you can do with active desktop.

I know there's some API call that will set your desktop image, as I used it with VB6 for a program to load a desktop image.

Unfortunately, I don't have VB6 on this machine. If you can't find anything else, I'll look around on my other PC and see if I can find the source for this and make you a program, but it'll take a few days.
 
Status
Not open for further replies.
Top Bottom