PDA

Click to See Complete Forum and Search --> : Active Desktop Javascript Menu...Huh?


Bloodeye
Apr 2nd, 2001, 03:41 PM
One day while surfing I found this web-page:

http://www.dhtmlshock.com/site-navigation/SlidingMenuWithGen/default.asp

Like everyone else who has seen a "sliding" or "pull-out" menu before I wasn't too impressed. Then I thought to myself: I wonder if I could incorporate this menu into an Active Desktop....maybe put some links to favorite web-sites, and some links to programs or documents.

BTW: The above site has an on-line menu generator...

So I started tinkering around, and to make a long story shorter....I got it to work somewhat. I can get it to launch IE and navigate to the URL of the link, but I'm not sure what the format is to start a program. Here's the code:

startMenu("Links", "MYSTUFF")
addItem("VBForums", "http://www.vbforums.com", "about:blank");
addItem("PlanetSourceCode", "http://www.planetsourcecode.com", "about:blank");
addItem("VBInternetProg", "http://www.vbip.com/forum/", "about:blank");
addHdr("Programs");
addItem("FlashFXP", "file://C:\Program Files\FlashFXP\flashfxp.exe", "");
addItem("WinRAR", "file:///C:/Program Files/WinRAR/WinRAR.exe", "");
endMenu()

addItem format is:
addItem("Name of link in menu", "link or URL", "Target Frame")

Is there a way of having it start a program, my two attempts above didn't work? Maybe I need some more code to get it to work....I have no idea. Second question is the web-page links work...I even added about:blank to have it start a new instance, but is there a way to have it start a new instance and have that instance maximized?

sail3005
Apr 2nd, 2001, 09:49 PM
I don't think that this is possible, because for security reasons, websites cannot run programs. Besides of course email, etc.

chrismitchell
Apr 3rd, 2001, 03:46 AM
I think that you could probably download the applet or JavaScript but I doubt that it can be made online as Sail pointed out because of the Security reasons... Is a shame though.... looks very nice!

Bloodeye
Apr 3rd, 2001, 08:21 AM
I'm not sure if I understand your replys. Just to be clear I'm not using this online. I'm using this as part of an Active Desktop component. It works as far as having it show-up on your desktop, and clicking on the links with valid URL's works also. As far as making it Online - it will generate any links that you type in.

I'm more or less interested in making it launch, or start, or run, or shell a program. Much like a shortcut on your desktop does. Does anyone have any ideas for making this happen?

I don't know java or javascript well, I'm more of a VB programmer, but I think this could work. At least I hope it does....it looks good on the desktop.

Jerry Grant
Apr 3rd, 2001, 08:50 AM
I use something similar or an active desktop, although this only opens favorite websites.

However, the principle of opening normal applications is simple.

Create a VB ActiveX DLL, with a single function to 'Shell' applications. Then when your java menu is clicked, pass the file reference and any command line parameters to the DLL procedure, and this will open the application.

If you need a sample, let me know.:cool:

Bloodeye
Apr 3rd, 2001, 03:34 PM
Jerry that sounds like a good idea. A sample to get me going in the right direction would be nice.

Thanks alot.

Jerry Grant
Apr 4th, 2001, 03:01 AM
OK,

I'll build you a sample DLL, with the HTML front end...

I'll post it when done. ;)

Jerry Grant
Apr 4th, 2001, 06:04 AM
I attach the ActiveX DLL sample, together with an DHTML menu bar which you can use as your desktop wallpaper.
The DLL, is very basic, so no error trapping for 'file not found' etc, so will need a bit of tweeking!

Don't forget to register the DLL with Regsvr32.exe if you are not going to build a new one.

Modify the links in the 'AXDesktop.htm' file to add your own favorite sites and desktop applications.

Let me know how you get on. :cool:

Bloodeye
Apr 4th, 2001, 11:50 AM
Hey - I tried your menu out, everything works great.

There's one more thing, if you have the time. In the attachment below is the slide-out menu that I generated from the dhtmlshock website. Could you take a look at it and tell me how I can incorporate your Active X DLL. Again my understanding of javascript is limited and trying to mix javascript with vbscript has got my head swimming. Hopefully it should be a simple transition, for everything I have tried has bombed.

Side Note: How difficult would it be in your opinion to make this slide-out menu in vbscript? Only reason I ask is I haven't seen anything like this in vbscript.

Thanks again