Results 1 to 9 of 9

Thread: Active Desktop Javascript Menu...Huh?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300

    Talking

    One day while surfing I found this web-page:

    http://www.dhtmlshock.com/site-navig...en/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?

  2. #2
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    I don't think that this is possible, because for security reasons, websites cannot run programs. Besides of course email, etc.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  3. #3
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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!

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    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.

  5. #5
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    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.
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    Jerry that sounds like a good idea. A sample to get me going in the right direction would be nice.

    Thanks alot.

  7. #7
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810

    Thumbs up

    OK,

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

    I'll post it when done.
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  8. #8
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810

    Cool S A M P L E A T T A C H E D ..........

    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.
    Attached Files Attached Files
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    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
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width