madmatt_dtop: official help thread

first of all i would like to thank madmatt for putting this tutorial up for all of us. i've been craving for a desktop like this since i saw this. also, thanks to MdSalih for his take on it. i've been tinkerig with his very extensivly. basicaly just getting it to work for me :)

i have noticed something that i would like to let people know about, if they are going to try this: it has been my experience that shortcut's with spaces in the names don't work. this might just be for me, but i'm sure that other people have had then same thing. for example "My Documents" would not work for me, but "MyDocuments" would function perfectly. I'm sure that this is sure to the fact that spaces break the internet :)
 
Recycle Bin?

Me again. is anyone else having trouble getting the recycle bin link to work? so far i have only tried it on my school laptop, and it is a little more messed up than my home comp. i'm pretty sure that the link is launching my "Empty Norton Protected Files" part of my recycle bin. anyone else having this problem? btw, i am running Norton SystemWorks 2002, and i am allowing the script to run.

[edit]
I probably should include what the .vbs file looks like
------------------------------
Dim oShell
Set oShell = WScript.CreateObject ("WScript.shell")
oShell.run "RecycleBin"
Set oShell = Nothing
------------------------------

and of course my link is called recyclebin.lnk
[/edit]
 
I've used the tutorial to create links using an html page, but now I am trying to make a desktop in flash. I can't figure out how to get the flash file to launch the vbs script.

Does anyone know what to put in the actionscript of the flash item to make it execute the vbs?

Edit: Nevermind, I figured out how to after playing around with the flash and the javascript for a little bit. If anyone wants to know how to make shortcuts work in a flash, just ask.
 
You start by doing what madmatt's tutorial says and place the javascript in the head of an html file and also creating the shortcuts and vbs files and placing those in your windows directory:

Code:
<script language=JavaScript>
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>

Then you insert the javascript code that allows info to be taken from the Flash file (which was generated by flash when an html file is created:

Code:
<SCRIPT LANGUAGE=JavaScript>
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function desktop_DoFSCommand(command, args) {
  var desktopObj = InternetExplorer ? desktop : document.desktop;
  //
  // Place your code here...
  //
}
// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub desktop_FSCommand(ByVal command, ByVal args)\n');
document.write('  call desktop_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
//-->
</SCRIPT>

In the part that says place your code here(from above), you will need to insert :

exec(command);

Also, in the code above, the line that says:
function desktop_DoFSCommand(command, args) {
You will need to change "desktop" to the name of your flash movie(which is defined in the html where the swf file is embeded), without the extension.

Then, you will need to add the html code into the html file to call for the swf:

Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" 
width="550" height="400" ID="desktop">
<param name="movie" value="desktop.swf">
<param name="quality" value="high">
<embed src="desktop.swf" quality="high" swLiveConnect="true" NAME="desktop"
 pluginspage="http://www.macromedia.com/go/getflashplayer" 
type="application/x-shockwave-flash" width="550" height="400">
</embed></object>

You will need to change, in the object tag, the ID parameter to the name of your movie. In the next tag
<param name="movie" value="desktop.swf">
You will need to change the desktop.swf to the file of your movie.
Do that again in the embed tag for src. Then change the width and height, in the embed tag, to the width and height of your movie.

Now, everything in your html file that is needed for this to work should be done.

In flash, select the item which you want to be the shortcut (we will use a shortcut to the control panel for an example). Convert it to a button if it is not one already. Then right-click it and select action. In the window, insert the following:

Code:
on (release) {
    fscommand ("control", "blank");
}

Change the text control to the name of the vbs file without the extension. That should be all, and now when you click the link in your swf(which must be opened in the html page or the link won't work) the control panel or other item will be loaded.

To see what my swf looks like, go to my post here.

Edited to take out the smilies and to prevent a bottom horizontal scroll bar.
 
Me likes! j00 R0<|< Gonna play with this when I get home later :D

EDIT: cool, that works ^_^ wonder how the fork he did the weather info and display the coolmon system stats tho :p (and I also wish I knew how to make those lil windows transparent ^_~)
 
great work! been trying it out and i got the links to work now. However, everytime i refresh the html file and click on a link, i get an "ActiveX control on this page might be unsafe..." dialog. Is there any way to turn that off. Tried everything in IE settings but it still didn't work... Thanks!
 
Problems with Hex Workshop

When u have installed Hex Workshop, Does it loads the shorcut in the program instead of opening folders???
 
Originally posted by Dyle
great work! been trying it out and i got the links to work now. However, everytime i refresh the html file and click on a link, i get an "ActiveX control on this page might be unsafe..." dialog. Is there any way to turn that off. Tried everything in IE settings but it still didn't work... Thanks!

matt touches on that in his tutorial, near the bottom
 
=P, uninstalled Hex

also, i can't get to activate the My computer security Settings...

Sorry to bother so much
 
Originally posted by Piett


matt touches on that in his tutorial, near the bottom

Yeah...forgot to mention that. I did follow the instructions but there was no my computer zone under the security tab. Did a little searching and found out that i need to install ie administrator's development kit. Haven't realy tested it yet coz i was hoping there was another way. Do i really have to download and install ieadk to change the my computer zone settings?
 
You'll have to excuse any idiotic mistakes that I've made, but.. i've followed the tutorial exactly as it appears on madmatt's page, the trouble is, it won't open explorer :( instead, WMP tries to load a file??:confused: and produces this error message, can anyone explain to me why, and how to fix this.

Thanks in advance
 
eek.... i've realised, my videologic player has bound .vbs files to run with directshow for some reason...:confused: thats why WMp tries to load up :(
 
That happened to me too. Muy Xing MPEG player bound all vbs files. I just deleted the file extention in the list and created a new .vbs entry and chose "vbs scripting script" or something like that as the type.
 
Ok so how can I get system stats/Coolmon stats in PHP to work in the active desktop? Also has anyone figured out how to get the latest 5 posts (like on the xp-erience homepage). I'd really like like on my desktop.

Nice work everyone!

Ta

A1ehouse
 
ah, sorry bout the confusion that may have been caused Dyle. Good job in finding out the answer though
 

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,623
Latest member
AndersonLo
Back