Active Desktop Curiosity Question (Speedy_B Would Love this :P)

Alex_is_Axel

.:: FTPAlex ::.
Joined
2 Jun 2002
Messages
1,156
Goodmorning everyone,

I just noticed on the main screen this morning about the powertoys for windows with the changing wallpaper and screensaver. Anyways, i was wondering, obviously if you have Active Desktop like myself, you wouldnt be able to spot the wallpaper changing from that software. Is there a script you could add to the active desktop which could make the wallpaper change every time it is refreshed or loaded up? I was thinking along the lines of php scripts but i dont know alot/if any about php :p which is why i thought Speedy_B would love this :p. So is there a script of some sort which would do this job?

I would be interested in hearing your ideas or even methods to do so :D

Thank you for your time :cool:

Sincerly Alex:D
 
It'll be a lot easier to do with javascript, php doesnt have simple timer functions.
I have a bad headache atm, but i'll look into it tommorrow.
 
*UPDATED* Simplified so its easier to just copy and paste



I think I can field this one...I'll let you in on how I do it....

required:

---------

Rename your wallpapers with the following naming convention

Wallpaper0
Wallpaper1
Wallpaper2
Wallpaper3
.
.
WallpaperN

Where N = highest number

----------

In the body section of your html file simply paste the following code:

<script language="javascript" type="text/javascript">

var randomNumber=Math.floor(Math.random()*N)

document.body.background="images/Wallpaper" + randomNumber + ".jpg"

</script>


Where the N in the randomNumber calculation is the highest number you got while renaming your wallpaper images. (This code also assumes that every one of your wallpapers has a ".jpg" extension, which they probably do.)

You may also have to change the folder path, this example has the wallpaper images located in a folder called 'images' that is located with the HTML file itself.
 
hrm, javascript on active Dtop is a key to disaster. My active Dtop has crashed several times, i remove all the java shiz and its fine.
 
thank you Blitzkrieg.. ill give that a try now.. see if i can work it out :p

X-Istence - ive got about 4 different JavaScript codes on my desktop.. no problems with any of them ... yet :blink:

Thanx once again.. ill let you know how i get on

:cool:
 
when i put it in, and refresh the desktop, it just comes up as white.. what am i doing wrong?
 
good day to you all
how are you?

why are you off alex smith?

you cant be ill your up now.
 
lol 4 sum reason people can use my NTFS Name on here, so that last 2 were from alex.
 
your not allowed to spam on NTFS.org Steven Williams :p

i got back at 2am lastnight.. im really knackered.. ill definatly be in tomoz

you should log off before you close the site next time steven ;)
 
im not spaming im adding a comment, to your subject, which shouldnt b on
 
Originally posted by Alex_is_Axel
... i was wondering, obviously if you have Active Desktop like myself, you wouldnt be able to spot the wallpaper changing from that software. Is there a script you could add to the active desktop which could make the wallpaper change every time it is refreshed or loaded...

I have a timer jscript which can be altered to handle what you're looking to do (and more), courtesy of SONY's overbuilt, semi-useless Vaio desktop. Me gots it at home on my SR7K so I can post it this evening if you'd like. The source should be available somewhere on the web if you're impatient --like I tend to be. :)
 
Originally posted by ste_w
im not spaming im adding a comment, to your subject, which shouldnt b on

what comments that then? i dont recall something you've put related to this post?

Originally posted by Lighter
I have a timer jscript which can be altered to handle what you're looking to do (and more), courtesy of SONY's overbuilt, semi-useless Vaio desktop. Me gots it at home on my SR7K so I can post it this evening if you'd like. The source should be available somewhere on the web if you're impatient --like I tend to be.:)

Thank you Lighter, :D.. im paitent :p. I would appreciate your script.. ill be looking forward to hearing from you again later on
:cool:

thanx again

:cool:
 
Hey Alex, is it still giving you problems? If so, post the code your using up.

Just one important thing to check would be the path name you are specifying. Make sure its right, and that its navigating to the right folder, or it won't find the file and just give you a white screen.

Blitz,
Good Luck
 
Welcome back Blitzkrieg

I created a folder in the folder where my active desktop html script is found for which i put my wallpapers i wanted to use there. I then re-named all the wallpapers to wallpaper0 - wallpaper7 inwhich 7 was the highest number. So i did the first step fine.. i think


I put the wallpapers in this folder located here:
C:\Active Desktop\New Active Desktop\Wallpapers

The HTML desktop script is found here:
C:\Active Desktop\New Active Desktop

So its just in a folder located in the active script folder.. is this write or do i need to change that?

The next step i changed to this:

**<script language="javascript" type="text/javascript">

var randomNumber=Math.floor(Math.random()*7)

document.body.background="C:\Active Desktop\New Active Desktop\Wallpapers" + randomNumber + ".jpg"

</script>** (without the ** of course)

Is this right or do i need to change anything else? have i put the location in wrong?
ie. document.body.background="C:\Active Desktop\New Active Desktop\Wallpapers" + randomNumber + ".jpg"


Thank you for your help

sincerly Alex :cool:
 
Ok, I think I see your problem


--Location of WallpaperN.jpg's
-----------

C:\Active Desktop\New Active Desktop\Wallpapers

-----------



--Actual path to Wallpaper1.jpg
-----------

C:\Active Desktop\New Active Desktop\Wallpapers\Wallpaper1.jpg

-----------



--What you used
-----------

document.body.background="C:\Active Desktop\New Active Desktop\Wallpapers" + randomNumber + ".jpg"

-----------



--What you should have used
-----------

document.body.background="C:\Active Desktop\New Active Desktop\Wallpapers\Wallpaper" + randomNumber + ".jpg"

-----------



--What I would use to make it shorter
-----------

document.body.background="Wallpapers\Wallpaper" + randomNumber + ".jpg"

-----------



Personally I would use this last example, because its alot more user friendly. Even if you move the script from your 'New Active Desktop' back to your 'Active Desktop' folder this will still work as long as you have a folder named 'Wallpapers' in the same folder as the .html file.

Also, one last thing to check is that the extensions on each of your wallpapers is in fact .jpg, because this could create a problem.

Hope this helps,
Blitz
 
Originally posted by Blitzkrieg
Ok, I think I see your problem


--Location of WallpaperN.jpg's
-----------

C:\Active Desktop\New Active Desktop\Wallpapers

-----------



--Actual path to Wallpaper1.jpg
-----------

C:\Active Desktop\New Active Desktop\Wallpapers\Wallpaper1.jpg

-----------


Do i have to put this anywhere onto the HTML active desktop script?
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back