My Active Desktop :)

Discussion in 'Programming & Software Development' started by StratosFear, Feb 7, 2003.

  1. StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    Today i started looking into a couple of different program to customise desktop. But then I realised i didn't even need a program. The following is my desktop after a day of experimentation. Some ideas are my own. Some are stolen off others :)

    [​IMG]

    Sorry about the large image but only way to keep quality semi decent.

    I have a few other things to do. I will have a little row of icons in the bottom right corner. For the most used programs like IE and irc etc.

    I also want to have a panel which will show me the latest OCAU forum posts which i have all sorted out i just need to implement it.

    I will also remove that ugle recycle bin and hack away the Start button on the menu down the bottom :)

    Anyway please let me know what you think. Any suggestions would be cool. This is far from finished but i will be working on it slowly from now on. No more 8 hour days :)
     
  2. Geo

    Geo Member

    Joined:
    Jun 27, 2001
    Messages:
    2,368
    Location:
    Adelaide
    Looks good.

    I never see my desktop though, I always have windows open, so its a bit of a waste of time for me to do.
     
  3. Sc0tty

    Sc0tty Member

    Joined:
    Oct 18, 2002
    Messages:
    958
    Location:
    ^.Syd.>
    WOuld you be able to go into a bit more detail on how you did the indiviual pieces?

    </n00b questions>
     
  4. rick_422

    rick_422 Member

    Joined:
    Jul 25, 2002
    Messages:
    118
    Location:
    Victoria
    Sc0tty
    head over to ntfs.org and look for the active desktop tutorial made by madmatt
    top notch stuff
    will explain most of it!
     
  5. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    yeah that's where i started.


    Then started using VBS scripts like the ones that coolmon uses. And used VB to access the text files they generate. That's where the TV guide and weather guides come from.
     
  6. Sc0tty

    Sc0tty Member

    Joined:
    Oct 18, 2002
    Messages:
    958
    Location:
    ^.Syd.>
    Must give it a go sometime.
    Looks very nice and actually very handy.

    Whats it like on system resources?
     
  7. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    i havn't noticed any major differences on system resources.

    would be a lot less than running programs like samurize or lightstep etc i would assume.

    I am going to redesign mine totally hopefully tomorrow if i get the chance. First time in a couple of months i have touched javascript and VBScript so my code was very very messy.

    If anyone else is using an active desktop then stick a pic in here.
     
  8. isometrix

    isometrix Member

    Joined:
    Jun 27, 2001
    Messages:
    193
    Location:
    Sydney
    can u upload ur html file or whateva it is...I really would like to use that setup for my desktop...its very handy.
     
  9. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    My HTML is an absoloute disgrace atm :) A lot of copy/pasted code combined with my own == very messy code.

    I am in the middle of redesigning it from the ground up.

    Once done i will post all my code and shortcuts etc.

    For now I recomend reading the tutorial at ntfs.org as it is a great start.
     
  10. Aziraphale

    Aziraphale Member

    Joined:
    Jan 5, 2002
    Messages:
    551
    Location:
    Canberra
    Wow, that is very nice. Well done :)

    I'm currently using Samurize but was thinking of using an active desktop - pretty sure I will now after seeing how nice it can look.

    I assume you need an always on 'net connection to make it work properly. How well does it work when there is no 'net connection?
     
  11. s4Rg3

    s4Rg3 Member

    Joined:
    Jun 15, 2002
    Messages:
    563
    Location:
    4178, QLD
    can you use that stuff with windows 98 se? :confused:
     
  12. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    if you use things like weather and tv etc then obviously you need net connection permenant.

    but for the other stuff like calender and local links etc you don't need a net connection. Everything is done locally.

    I am redoing it just with links i think. As well as a winamp now playing thing etc. Will hopefully get time to do it today.

    Pretty sure you can do active desktop on windows 98 as well.
     
  13. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    redesigned it briefly. Rewrote the routines for writing the tv and weather data to the page. Much better now.

    [​IMG]

    There is no easy way to allow the desktop to be downloaded due to the shortcuts to my apps etc. I will stick my code up here to give an idea but keep in mind that it is still really messy. No time to fix it up atm. Will tidy it one day and comment it all :)

    Code:
    <html>
    <head>
    <META HTTP-EQUIV=Refresh CONTENT="600; URL="desktop.html">
    <title></title>
    
    <LINK href="activedesktop.css" type=text/css rel=stylesheet>
    <SCRIPT LANGUAGE="JavaScript">
    function MakeArrayday(size) {
    this.length = size;
    for(var i = 1; i <= size; i++) {
    this[i] = "";
    }
    return this;
    }
    function MakeArraymonth(size) {
    this.length = size;
    for(var i = 1; i <= size; i++) {
    this[i] = "";
    }
    return this;
    }
    function funClock() {
    if (!document.layers && !document.all)
    return;
    var runTime = new Date();
    var hours = runTime.getHours();
    var minutes = runTime.getMinutes();
    var seconds = runTime.getSeconds();
    var dn = "AM";
    if (hours >= 12) {
    dn = "PM";
    hours = hours - 12;
    }
    if (hours == 0) {
    hours = 12;
    }
    if (minutes <= 9) {
    minutes = "0" + minutes;
    }
    if (seconds <= 9) {
    seconds = "0" + seconds;
    }
    movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
    if (document.layers) {
    document.layers.clock.document.write(movingtime);
    document.layers.clock.document.close();
    }
    else if (document.all) {
    clock.innerHTML = movingtime;
    }
    setTimeout("funClock()", 1000)
    }
    window.onload = funClock;
    //  End -->
    </script>
    <script>
    function exec (command) {
      if (document.layers && navigator.javaEnabled()) {
        window._command = command;
        window.oldOnError = window.onerror;
        window.onerror = function (err) {
          if (err.indexOf ("User didn't grant") != -1) {
            alert('command execution of ' + window._command + 
                  ' disallowed by user.'); 
            return true;
          }
          else return false;
        }
        netscape.security.PrivilegeManager.enablePrivilege
    ('UniversalExecAccess');
        java.lang.Runtime.getRuntime().exec(command);
        window.onerror = window.oldOnError;
      }
      else if (document.all) {
        window.oldOnError = window.onerror;
        window._command = command;
        window.onerror = function (err) {
          if (err.indexOf('utomation') != -1) {
            alert('command execution of ' + window._command + 
                  ' disallowed by user.'); 
            return true;
          }
          else return false;
        };
        var wsh = new ActiveXObject('WScript.Shell');
        if (wsh)
          wsh.Run(command);
        window.onerror = window.oldOnError;
      }
    }
    </script>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script>
    
    <script type = "text/javascript">
    <!--
       var fso, f1, ts;
    
    var line = new Array(26);
       var ForReading = 1;
       var filename = "c:\\windows\\active\\scripts\\tvguide.txt";
       fso = new ActiveXObject("Scripting.FileSystemObject");
       
       ts = fso.OpenTextFile(filename, ForReading);
       for ( var i = 1 ; i <= 26; ++i){
     line[i] = ts.ReadLine();
    }
       ts.Close();
      
    document.writeln("<div id=\"Layer4\" style=\"position:absolute; width:400px; height:115px; z-index:3; left: 15px; top: 575px;\"><a class=\"title\">.:now.playing:.</a>");
    document.writeln("<br>");
    document.writeln("<b>" + line[1] + "</b> - <i>" + line[2] + "</i>");
    document.writeln("<br>");
    document.writeln("<b>" + line[3] + "</b> - <i>" + line[4] + "</i>");
    document.writeln("<br>");
    document.writeln("<b>" + line[5] + "</b> - <i>" + line[6] + "</i>");
    document.writeln("<br>");
    document.writeln("<b>" + line[7] + "</b> - <i>" + line[8] + "</i>");
    document.writeln("<br>");
    document.writeln("<b>" + line[9] + "</b> - <i>" + line[10] + "</i>");
    document.writeln("<br>");
    document.writeln("<a class=\"title\">.:next:.</a>");
    document.writeln("<br>");
    document.writeln("<b>" + line[11] + "</b> - <i>" + line[12] + "</i><b> - " + line[13] + "</b>" );
    document.writeln("<br>");
    document.writeln("<b>" + line[14] + "</b> - <i>" + line[15] + "</i><b> - " + line[16] + "</b>" );
    document.writeln("<br>");
    document.writeln("<b>" + line[17] + "</b> - <i>" + line[18] + "</i><b> - " + line[19] + "</b>" );
    document.writeln("<br>");
    document.writeln("<b>" + line[20] + "</b> - <i>" + line[21] + "</i><b> - " + line[22] + "</b>" );
    document.writeln("<br>");
    document.writeln("<b>" + line[23] + "</b> - <i>" + line[24] + "</i><b> - " + line[25] + "</b>" );
    document.writeln("<br></div>");
    // -->
    </script>
    
    <script type = "text/javascript">
    <!--
       var fso, f1, ts;
    
    var line = new Array(26);
       var ForReading = 1;
       var filename = "c:\\windows\\active\\scripts\\weather.txt";
       fso = new ActiveXObject("Scripting.FileSystemObject");
       
       ts = fso.OpenTextFile(filename, ForReading);
       for ( var i = 1 ; i <= 10; ++i){
     line[i] = ts.ReadLine();
    }
       ts.Close();
      
    document.writeln("<div id=\"Layer5\"  style=\"position:absolute; width:400px; height:115px; z-index:3; left: 790px; top: 570px;\"><a class=\"title\">.:forecast:.</a>");
    document.writeln("<br>");
    document.writeln("<b>Today</b> - " + line[3] + " - <i>" + line[4] + "</i>");
    document.writeln("<br>");
    document.writeln("<b>"+ line[5] + "</b> - " + line[6] + " - <i>" + line[7] + "</i>");
    document.writeln("<br>");
    document.writeln("<b>"+ line[8] + "</b> - " + line[9] + " - <i>" + line[10] + "</i>");
    document.writeln("<br></div>");
    // -->
    </script>
    
    </head>
    <body background="background.jpg" scroll="no">
    
    
    
    
    <div id="Layer3" style="position:absolute;  left: 15px; top: 15px; z-index:1">
    <a class="title">.:quick.links:.</a>
    <br>
    <a href="http://www.overclockers.com.au">overclockers.australia </a><a class="title">|</a><a href="http://www.penny-arcade.com"> penny.arcade </a><a class="title">|</a><a href="https://www1.netbank.commbank.com.au/netbank/bankmain.htm"> net.banking </a><a class="title">|</a><a href="http://www.xbox-scene.com"> xbox.scene </a><a class="title">|</a><a href="http://www.xboxhacker.net"> xbox.hacker </a>
    </div>
    
    <div id="Layer2" style="position:absolute; width:200px; height:64px; left: 790px; top: 630px; z-index:2">
    <table width="100%" border="0">
      <tr>
          <td height="64" width="70"><a onClick="exec('drive.vbs'); return false;" href="java script:void(0)"><img src="icons/c.jpg" width="64" height="64"></a></td>
    	<td height="64" width="70"><a onClick="exec('d.vbs'); return false;" href="java script:void(0)"><img src="icons/d.jpg" width="64" height="64"></a></td>
    	<td height="64" width="70"><a onClick="exec('f.vbs'); return false;" href="java script:void(0)"><img src="icons/f.jpg" width="64" height="64"></a></td>	
    	
      </tr>
    </table>
    
    
    </div>
    <div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 940px; top: 715px;"><span id=clock style="position:relative;"></span></div>
    <div id="Layer2" style="position:absolute; width:200px; height:115px; z-index:2; left: 814px; top: 13px;"> 
      <div align="right"><a class="title">.:burning:.</a> <br>
        <a onClick="exec('alcohol.vbs'); return false;" href="java script:void(0)">alcohol.120%</a> 
        <br>
        <a onClick="exec('nero.vbs'); return false;" href="java script:void(0)">nero.burning.rom</a> 
        <br>
        <a class="title">.:development:.</a> <br>
        <a onClick="exec('dreamweaver.vbs'); return false;" href="java script:void(0)">dreamweaver.mx</a> 
        <br>
        <a onClick="exec('editplus.vbs'); return false;" href="java script:void(0)">edit.plus</a> 
        <br>
        <a onClick="exec('imageready.vbs'); return false;" href="java script:void(0)">image.ready</a> 
        <br>
        <a onClick="exec('photoshop.vbs'); return false;" href="java script:void(0)">photoshop.7</a> 
        <br>
        <a class="title">.:gaming:.</a> <br>
        <a onClick="exec('cogs.vbs'); return false;" href="java script:void(0)">cogs</a> 
        <br>
        <a onClick="exec('tetris.vbs'); return false;" href="java script:void(0)">tetris.attack</a>
        <br>
        <a class="title">.:media:.</a> <br>
        <a onClick="exec('cdex.vbs'); return false;" href="java script:void(0)">cdex</a> 
        <br>
        <a onClick="exec('cdplayer.vbs'); return false;" href="java script:void(0)">cdplayer</a> 
        <br>
        <a onClick="exec('gk.vbs'); return false;" href="java script:void(0)">gordian.knot</a> 
        <br>
    	<a onClick="exec('realplayer.vbs'); return false;" href="java script:void(0)">realplayer</a> 
        <br>
        <a onClick="exec('tvtool.vbs'); return false;" href="java script:void(0)">tv.tool</a> 
        <br>
        <a onClick="exec('winamp.vbs'); return false;" href="java script:void(0)">winamp</a> 
        <br>
        <a onClick="exec('windvd.vbs'); return false;" href="java script:void(0)">win.dvd</a> 
        <br>
        <a class="title">.:internet:.</a> <br>
        <a onClick="exec('flashfxp.vbs'); return false;" href="java script:void(0)">flashfxp</a> 
        <br>
        <a onClick="exec('flashget.vbs'); return false;" href="java script:void(0)">flashget</a> 
        <br>
        <a onClick="exec('imesh.vbs'); return false;" href="java script:void(0)">imesh</a> 
        <br>
        <a onClick="exec('ie.vbs'); return false;" href="java script:void(0)">internet.explorer.6</a> 
        <br>
        <a onClick="exec('mirc.vbs'); return false;" href="java script:void(0)">mirc</a> 
        <br>
        <a onClick="exec('zoomplayer.vbs'); return false;" href="java script:void(0)">zoom.player</a> 
        <br>
        <a class="title">.:office:.</a> <br>
        <a onClick="exec('excel.vbs'); return false;" href="java script:void(0)">excel.xp</a> 
        <br>
        <a onClick="exec('powerpoint.vbs'); return false;" href="java script:void(0)">powerpoint.xp</a> 
        <br>
        <a onClick="exec('word.vbs'); return false;" href="java script:void(0)">word.xp</a> 
      </div>
    <div id="Layer7" style="position:absolute; width:200px; height:115px; z-index:1; left: -800px; top: 50px;"> 
      <script src="calendar.js"></script></div>
    <div id="Layer8" style="position:absolute; width:200px; height:115px; z-index:1; left: -800px; top: 210px;"> 
    	<a onClick="exec('assorted.vbs'); return false;" href="java script:void(0)">-assorted</a> 
        <br>
    	<a onClick="exec('downloads.vbs'); return false;" href="java script:void(0)">-downloads</a> 
        <br>
    	<a onClick="exec('music.vbs'); return false;" href="java script:void(0)">-music</a> 
       <br>
      </div>
    
    </body>
    </html>
    
     
    Last edited: Feb 9, 2003
  14. Shinglor

    Shinglor Member

    Joined:
    Jun 28, 2001
    Messages:
    2,382
    Last edited: Feb 9, 2003
  15. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    I am using
    http://coolmon.arsware.org/extensions/extension.php?id=61

    and

    http://coolmon.arsware.org/extensions/extension.php?id=50

    vbs scripts. I modified them a bit to only output the txt i need. Then just scheduled them to run every once and a while.

    The tv one runs at 35past and 5 past the hour.

    The weather one runs every hour but can probably change that to every 6 hours or so.

    Use windows scheduler to run them. Then I used javascript to take lines of txt from the files and output them to html.
     
  16. Shinglor

    Shinglor Member

    Joined:
    Jun 28, 2001
    Messages:
    2,382
    These scripts scan the entire HTML page for the data, I was hoping for a nice XML file. YourTV XML syndication costs money and I haven't found a free XML TV guide yet.
     
  17. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    to be honest. one of the main reason i didn't even consider XML is due to the fact that I have spent a lot more time studying JS and VB than XML.

    Your correct in saying an XML system would probably be easier and more efficient. But the VB script and JS works fine for what it's doing.
     
  18. Shinglor

    Shinglor Member

    Joined:
    Jun 28, 2001
    Messages:
    2,382
    You can still use VBS & JS with XML files. Look for a tutorial on XMLHTTP and XMLDOM.
     
  19. t00|

    t00| Member

    Joined:
    Jan 9, 2002
    Messages:
    2,777
    Location:
    Bunbury
    omfg, do me one :D

    i HAVE to start reading that up :D
     
  20. OP
    OP
    StratosFear

    StratosFear Member

    Joined:
    Jun 27, 2001
    Messages:
    8,147
    Location:
    Melbourne, Australia
    I will give it a look when i get some free time. But for now i want to neaten up my code and add a little feature i have had in mind :) (will update later in the night hopefully if my code goes as planned :)
     

Share This Page

Advertisement: