Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Vista Sidebar Gadget Question [modified]

Vista Sidebar Gadget Question [modified]

Scheduled Pinned Locked Moved Windows API
helphtmlcsssysadminlinux
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jameschill
    wrote on last edited by
    #1

    I'm trying to make a sidebar gadget for vista. I'm no programmer. I need an easy way to copy a group of files to multiple locations on my network. These are mapped folders. Right now, I have to copy them then right-click each mapped drive (10 of them!) and select paste. What a pain. I want my gadget to simply allow me to drag and drop my group of files on it then it copies the files to each location - overwriting if they happen to exist with no warning dialog. Here is what I have so far - I've tried to get help elsewhere with no luck. curretly, this code doesn't copy the file(s) and I'm getting an error in the settings. No idea what it's doing at this point. Any help would be great. Gadget function onStartUp() { System.Gadget.settingsUI = "settings.html"; } function fileDragDropped() { var oFolder = System.Shell.itemFromPath(System.Gadget.Settings.readString("c:\\")).SHFolder; var oFile; for (var i=0; (oFile = System.Shell.itemFromFileDrop(event.dataTransfer, i)) != null; i++) oFolder.copyHere(oFile, 8); } body { width:130; height:65; <!-- CSS changes begin here --> padding-top: 0px; <!-- CSS changes end here --> }

    and here is the settings.html System.Gadget.onSettingsClosing = saveValues; function readValues(){ var sPath; for (var i=0; (sPath = System.Gadget.Setting.readString("path" + i)) != ""; i++) currentPath.options[currentPath.length] = new Option(sPath, sPath); } function saveValues(){ for (var i=0; i<currentPath.length; i++) System.Gadget.Setting.save("path" + i, currentPath.options.value); } function addUserPath(){ var oFolder = System.Shell.chooseFolder("", 512); if(oFolder != null) currentPath.options[currentPath.length] = new Option(oFolder.path, oFolder.path); } Folder:

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups