• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

#1
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
 

SPeedY_B

I may actually be insane.
#2
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.
 
B

Blitzkrieg

Guest
#3
*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.
 

X-Istence

*
Political User
#4
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.
 
#5
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:
 
#12
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 ;)
 

Lighter

. . . . . . . . .
#14
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. :)
 
#15
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:
 
B

Blitzkrieg

Guest
#16
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
 
#17
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:
 
B

Blitzkrieg

Guest
#18
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
 
#19
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 posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,247
Members
89,019
Latest member
fontjohnson