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

Discussion in 'Windows Desktop Systems' started by Alex_is_Axel, Apr 25, 2003.

  1. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    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
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    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.
     
  3. Blitzkrieg

    Blitzkrieg Guest

    *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

    Where N = highest number

    ----------

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


    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.
     
  4. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    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. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    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:
     
  6. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    when i put it in, and refresh the desktop, it just comes up as white.. what am i doing wrong?
     
  7. ste_w

    ste_w Moderator

    Messages:
    756
    Location:
    UK
    LOL its school time!!!
    wat time u get bk?
    y u off?
     
  8. ste_w

    ste_w Moderator

    Messages:
    756
    Location:
    UK
    hello my name is steven
     
  9. ste_w

    ste_w Moderator

    Messages:
    756
    Location:
    UK
    good day to you all
    how are you?

    why are you off alex smith?

    you cant be ill your up now.
     
  10. ste_w

    ste_w Moderator

    Messages:
    756
    Location:
    UK
    lol 4 sum reason people can use my NTFS Name on here, so that last 2 were from alex.
     
  11. Electronic Punk

    Electronic Punk Administrator Staff Member Political User Folding Team

    Messages:
    18,590
    Location:
    Copenhagen, Denmark
  12. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    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 ;)
     
  13. ste_w

    ste_w Moderator

    Messages:
    756
    Location:
    UK
    im not spaming im adding a comment, to your subject, which shouldnt b on
     
  14. Lighter

    Lighter . . . . . . . . .

    Messages:
    229
    Location:
    NYC
    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. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    what comments that then? i dont recall something you've put related to this post?

    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:
     
  16. Blitzkrieg

    Blitzkrieg Guest

    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. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    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:
     
  18. Blitzkrieg

    Blitzkrieg Guest

    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. Alex_is_Axel

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom


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

    Alex_is_Axel .:: FTPAlex ::.

    Messages:
    1,156
    Location:
    Cheshire, United Kingdom
    by the way.. all the wallpaper1 - 7's are all .jpg's so thats not a problem :D