Show/Hide Navigation pane button

Anonymous
2010-11-07
2014-04-06

  • Anonymous
    2010-11-07

    The WinXP Explorer has a very useful feature that is a button on toolbar to
    Show/Hide the folder tree on the left pane. It would be great if Classic Shell
    could make it back again in Win7.
    Thank you very much.

     
  • slartibartfast
    slartibartfast
    2010-11-07

    Hi, i made a little script for it:

    make a new text file and rename it in sendkeys.js, copy and paste following
    script and save.

    //*********
    // File: sendkeys.js
    //
    *********

    var WshShell = WScript.CreateObject("WScript.Shell");
    var objArgs = WScript.Arguments;

    for (var i=0; i < objArgs.Length; i++) // Loop through all arguments.
    WshShell.SendKeys(objArgs(i));

    //*** End

    now you can add a new button with the following commands:

    Toggle Navigation Pane
    wscript.exe sendkeys.js "%D{F6}{DOWN}LN{F6}" "%" "%"

    Toggle Preview Pane:
    wscript.exe sendkeys.js "%P"

    Toggle Detail Pane:
    wscript.exe sendkeys.js "%D{F6}{DOWN}LD{F6}" "%" "%"

    Make sure to send full path to wscript, eg: wscript.exe c:\utils\sendkeys.js
    "%D{F6}{DOWN}LN{F6}" "%" "%"

    ubi#

     
  • xpclient
    xpclient
    2010-11-08

    There is an unsupported tweak unrelated to Classic Shell to add any button to
    the Windows Explorer command bar (note: not the Classic explorer toolbar but
    the built-in Explorer command bar):

    If you tweak some registry values, you can add any button directly to the
    Command Bar of Windows 7 Explorer. Go to
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes and take
    ownership first and grant admin permissions of this parent reg key. If you
    expand this key, you will see each folder type defined there by a unique GUID
    or CanonicalName (Music.Library, Documents.Library, Printers, Generic etc).
    For example, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTyp
    es{5c4f28b5-f869-4e84-8e60-f11db97c5cc7} is the generic folder type that
    would apply to all regular folders in Explorer which are not special folders.
    Under each of these reg keys, you can create two subkeys: TasksItemsSelected
    and TasksNoItemsSelected. Once you create these keys, edit the "Default value"
    of each key to add the commands you want separated by a semicolon. The
    possible toolbar commands are listed here: HKLM\Microsoft\Windows\ CurrentVersion\Explorer\CommandStore. For example, to add a Show/Hide folder
    tree (navigation pane) button when no items are selected, under the Generic
    key, create TasksNoItemsSelected key then add Windows.navpane as its default
    value. You can take a look at the toolbar values I use: http://www.fileserve.
    com/file/AzaKe5t.
    Note that in my reg
    file, I have not included on purpose any command which Classic Shell's toolbar
    supports.

    Anyone please let me know if you could add commands this way or anything is
    unclear.

     
  • xpclient
    xpclient
    2010-11-09

    See the image for the result:

     
  • Jedi Kalimero
    Jedi Kalimero
    2010-11-27

    It worked for me
    If only I could add this new item as an icon in the right side and not as a
    text button in the left side, it would be perfect.

     
  • Rayco
    Rayco
    2011-01-16

    Toggle Navigation Pane wscript.exe sendkeys.js
    "%D{F6}{DOWN}LN{F6}" "%" "%"

    This key combination does not work, I use Windows 7 in Spanish. They may be
    the keys LN. A better way would be to not using letter keys, instead use
    the arrows.


    This is the optimal combination for any language:

    Toggle Navigation Pane

    wscript.exe sendkeys.js "%D{F6}{DOWN}{DOWN 7}{RIGHT}{DOWN 3}{ENTER}"
    

    For the icon: shell32.dll, 16755

    Why use the ALT key twice at the end? ("%" "%")

     
  • Can you please make these instructions plain enough for a computer idiot to
    understand.
    When you say "make a new text file and rename it in sendkeys.js" what does and
    where is: "in sendkeys.js" supposed to be in win 7?

    Can you please give more detailed step by step instructions on adding a
    Navigation Button on my explorer button bar?

    Thanks

     
  • Ab sorba
    Ab sorba
    2011-06-21

    First of all, thanks so much Ubi70 for that script! The "Folder" button was
    something i really missed in Windows 7.

    goodnewz777:

    I'll try to make it clearer.

    Wasn't quite sure if you wanted to place the button in Classic Shell's custom
    folder toolbar or the windows command bar (folder band). This is how you place
    the button in the classic shell toolbar:

    Paste the following into notepad and save the file as sendkeys.js.

    _//*********
    // File: sendkeys.js
    //
    *********

    var WshShell = WScript.CreateObject("WScript.Shell");
    var objArgs = WScript.Arguments;

    for (var i=0; i < objArgs.Length; i++) // Loop through all arguments.
    WshShell.SendKeys(objArgs(i));

    //*** End_

    Put that file somwhere, for example in "C:\Scripts".
    Then, create a custom button in the toolbar with Classic Shell. In the
    "Command" line for your button, paste the following command:

    wscript.exe c:\scripts\sendkeys.js "%D{F6}{DOWN}LN{F6}" "%" "%"

    An then of course, you have to change the path c:\scripts\sendkeys.js if you
    place your "sendkeys.js" file somwhere else.

    Hope that helps!

     
  • It worked! Thanks

    ...once I figured out how to create a custom button.

    Great utility program for Win 7.

     
  • Nick
    Nick
    2011-07-31

    Hi everybody,
    I just wanted to express sincere thanks to you all for this thread. I got
    Windows 7 just a couple of weeks ago and instantly missed the customisable
    Explorer Toolbar from XP.
    I soon found Classic Shell which is fantastic, and was then totally chuffed to
    discover this thread which has enabled me to add custom buttons for Navigation
    and Preview. Great stuff.
    @absorba, your instructions are wonderfully clear, I know nothing about
    javascript and would have been lost without your comments.
    So along with StEx bar, and a shell.dll hack to make the Folderband slide
    in/slide out, I'm once again a very happy man : )
    (Thinking about it, I guess if I learn to write my own javascripts, then I
    could dispense with StExbar, but that can wait for now.)
    Cheers,
    nick

     
  • Nick
    Nick
    2011-08-01

    @xp-client,
    I am a fan of the NIrsoft Utilities (esp USB Device View which is fantastic
    when you have 3 or 4 USB Drives connected in XP). But CustomExplorerToolbar is
    not the same thing at all as what we're discussing here. Classic Shell adds a
    different toolbar entirely, while the Nirsoft app edits the existing
    "Folderband".
    I also found that the Nirsoft app doesn't work very well yet. For example I
    tried to remove the "Share With" button with no success.

     
  • Doesnt work on Windows 7 for me..
    Can you tell me whats wrong..

    This is the content I pasted in sendkeys.js file:

    //*********
    // File: sendkeys.js
    //
    *********

    var WshShell = WScript.CreateObject("WScript.Shell");
    var objArgs = WScript.Arguments;

    for (var i=0; i < objArgs.Length; i++) // Loop through all arguments.
    WshShell.SendKeys(objArgs(i));

    //*** End

    And this is the comand I put:

    wscript.exe c:\scripts\sendkeys.js "%D{F6}{DOWN}LN{F6}" "%" "%"

     
  • Nick
    Nick
    2011-08-31

    Hi Caplan,
    I'm no expert here, but do you have any other explorer add ons, e.g. QtTabBar,
    installed?
    If so you will have to alter the button command. For Qt Tab I had to add an
    extra {F6} and even then it doesn't work if I have more than one tab open.
    On the other hand, have you made sure that your custom button command is
    pointing to the correct location for your sendkey file?

    Also, if anybody out there has successfully combined these custom commands
    with Qt Tab Bar, or knows how I can do it, please share your solution....

     
  • Hi sicknero,

    No, I don't have other explorer add ons..
    I hope always for a solution :-)

     

  • Anonymous
    2011-09-26

    Pleas could someone give me a hand here???

    Ok this somehow doesnt work for me.
    Ill explain what I did:
    I set the sendkeys.js up right, and the command also kinda works but in a
    wrong way.
    I dont know anything about "sendkeys" but what i think is that the first part
    "%D" means the key combo Alt+D. This opens up my "File Dialog". But if the
    next part "F6" is supposed to be the function key F6 at the top of my
    keyboard, this doesnt seem to be right, because F6 just doesn't have any
    effect if pressed manually.
    Do I get this right that I could perform all the key strokes manually and end
    up with the same result? Like so:
    "%D{F6}{DOWN}LN{F6}" "%" "%"
    =
    "Win+E"->"Alt+D"->"F6"->"Down key"->???what is LN ???->"F6"->"Alt"->"Alt" ?

    Also DarkRay's approach looks language independent, but again fails in the
    first part where "%D" comes into play.

    Any help on this one?
    Thx
    AO

     
  • pjfarr
    pjfarr
    2012-01-04

    The sendkeys.js technique has made Classic Shell 10x more valuable to me. Many
    thanks to ubi70 for contributing that.

    I was looking for a quick method of toggling the Navigation Pane as well and
    this did the trick beautifully. However, as pointed out by another user, the
    double "%" at the end of the sample provided in #2 seems to be unnecessary as
    leaving it out had no adverse effect for me. What is the double ALT at the end
    supposed to do?

    Anyway, with some experimentation I've been able to use this technique to
    create several toolbar buttons for functions I use a lot, like quickly sorting
    a folder by name, date, or type; copying a file's path to the clipboard,
    jumping quickly to my Favorites at the top of the Navigation pane, and closing
    the Navigation pane when opening the Preview pane to give the review more
    room.

    One I haven't been able to get to work for some reason is a button to open a
    folder's properties dialog directly on the Customization tab. I tried the
    sequence "%~^{PGUP}" (ALT+ENTER > CTRL+PAGE UP) which should work, but the
    sequence stalls on the Properties tab with the focus on the read only
    attributes. Typing out the key sequence manually works. Very frustrating.

    Anyone have any ideas on how to get this to work?

     
  • xpclient
    xpclient
    2012-06-27

    If you don't want to use the SendKeys method or it doesn't work for you, I
    have written step by step instructions and uploaded a ready to merge reg file
    here: http://sourceforge.net/projects/classicshell/forums/forum/1049756/topic
    /5281187
    It will add the navigation pane and other buttons to the Explorer
    command bar (the built-in Explorer toolbar, not the Classic Shell toolbar). Of
    course, the usual disclaimers apply - I am not responsible for breaking your
    system.

     
  • xpclient
    xpclient
    2012-06-30

    ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround a code snippet with "~~~~"?

    And here's yet another tool: [http://winaero.com/comment.php?comment.news.16](
    http://winaero.com/comment.php?comment.news.16) to do that.
    
    
     
  • xpclient
    xpclient
    2014-04-06

    Good news. The latest Classic Shell 4.0.6 has a built-in button now to toggle the folder/navigation pane as well as the Details pane and the Preview pane.