| Windows 7: Classic Shell Add On Buttons |
21 Mar 2011
|
#1 | | Several, including Windows 7 x64 Ultimate |
Classic Shell Add On Buttons Target; Get the windows controlled by these buttons to toggle the window on or off at each button press.
These Buttons are on the toolbar supplied by Classic Shell. This is part of a much larger project to customise my main Explorer functions and utilities. I use QTTabbar, StexBar, Classic Shell, and various other programs and scripts for this, but a few people asked me about toggle buttons, and so here they are. At present my explorer looks like this;
But is still very much a work in progress!
Required for the mods described; Classic Shell, Explorer++, Autohotkey Welcome to Classic Shell Explorer++ - A small and fast file manager for Windows AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText
Setting up a button;
The Command for this button; Code: C:\Program Files (x86)\AutoHotkey\AutoHotkey.exe D:\Autohotkey\ToggleExplorer++.ahk The script for this command; ToggleExplorer++.ahk Code: SetTitleMatchMode , 3 ;Sets EXACT match for the window title text
IfWinNotExist, Computer - Explorer++, ; Checks if the Explorer++ Window is there or not.
run D:\downloads\explorer++_1.2_x64\Explorer++.exe ;If it is not the program is loaded.
or IfWinExist, Computer - Explorer++, ; If the window already exists, then close it.
PostMessage, 0x112, 0xF060,,, Computer - Explorer++, ;Send close command to window.
Exit ; Exits the script This toggles the window on and off when the button is pressed. To toggle other window buttons just change the relevant commands and paths to the program required,
Example; Universal Viewer.
Command; Code: C:\Program Files (x86)\AutoHotkey\AutoHotkey.exe D:\Autohotkey\ToggleViewer.ahk Script= ToggleViewer.ahk Code: SetTitleMatchMode , 3
IfWinNotExist, Universal Viewer,
run C:\Program Files (x86)\Universal Viewer\Viewer.exe,
or IfWinExist, Universal Viewer,
PostMessage, 0x112, 0xF060,,,
Exit This is running on Windows 7 x64 Ultimate, but it should run on any version.
Why do I want an Explorer++ window in my QTTabbar? Because I can easily drag and drop directly to it, and Explorer++ does not have the same limitations with regard to system files as Windows Explorer, ( which QTTabBar runs on). Of course you can use any other file program which allows Drag&Drop as well. Obviously I have disabled most of the menu bars in Explorer++ ( Set up in options of Explorer++). Q-Dir is also very good. But actually any program will work. Both Explorer++ and Q-Dir have the advantage of being small, fast, and feature rich.
Regards...Mike Connor | My System Specs |
| OS Several, including Windows 7 x64 Ultimate |
21 Mar 2011
|
#2 | | Several, including Windows 7 x64 Ultimate |
Search a directory with "Everything" As a lot of people asked, here's an easy way to do it;
Required; Everything , StexBar, Download and install both programs.
Setup in StexBar;
Install StexBar.
Click on the "options" button. Setup as follows;
Enter this command: Code: C:\Program Files\everything\everything.exe "-search" %curdir %cmd|text" Save the setup and exit.
Entering a search term in the edit box will find any files matching or containing the term in the active directory and mask all others. The search occurs "as you type" and is very fast indeed.
One can also use similar commands to feed results to other files, Autohotkey scripts etc.
Regards...Mike Connor | My System Specs | | OS Several, including Windows 7 x64 Ultimate |
21 Mar 2011
|
#3 | | Several, including Windows 7 x64 Ultimate |
Using the address bar in Explorer to run system commands:
In any explorer window first go to Tools > Folder Options > View and enable 'View full path in Title Bar'
After that when this script is running just type '/' in the address bar of explorer window and type a System command to run it hidden.
And to run it visibly and keep the command prompt window after that command, just use '//' instead of '/'
Required; Autohotkey
Script; Code: ;___________________________________________
;______Easy Command Prompt - Rajat_________
; Type '/' in the address bar of explorer window and type
; a DOS command to run it hidden.
; And to run it visibly and keep the command prompt
; window after that command, just use '//' instead of '/'
Hotkey, Enter, Prompt
Hotkey, Enter, Off
exit
~/::
do = n
ControlGetFocus, ctl, A
IfWinActive, ahk_class CabinetWClass,, IfEqual, ctl, Edit1, setenv, do, y
IfWinActive, ahk_class ExploreWClass,, IfEqual, ctl, Edit1, setenv, do, y
IfEqual, do, n, Return
WinGetActiveTitle, pth
Hotkey, Enter, On
Return
Prompt:
Hotkey, Enter, Off
do = n
ControlGetFocus, ctl, A
IfWinActive, ahk_class CabinetWClass,, IfEqual, ctl, Edit1, setenv, do, y
IfWinActive, ahk_class ExploreWClass,, IfEqual, ctl, Edit1, setenv, do, y
IfEqual, do, n
{
Send, {Enter}
Return
}
ControlGetText, cmd, Edit1, A
StringLeft, check, cmd, 2
IfEqual, check, //
{
StringTrimLeft, cmd, cmd, 2
run, %comspec% /k %cmd%, %pth%
}
IfNotEqual, check, //
{
StringTrimLeft, cmd, cmd, 1
run, %comspec% /c %cmd%, %pth%, hide
}
ControlSetText, Edit1, %pth%, %pth%
Return This script courtesy of "Rajat" Command Prompt in Explorer Address Bar
<http://www.autohotkey.com/forum/topic348.html&highlight=command+prompt+address+bar>
One may simply type a system command into the address bar itself;
Such as "Regedit" above, and the system will jump to "Regedit" and run it. However, using the script runs the command prompt in the current directory and also allows one to capture the output to another script if desired.
Clicking on the small black "Down" arrow on the right of the address bar will show all the commands or searches you did in the address bar;
If you enter any valid Internet Address term (i.e WWW.example.com ) the system will jump to your default Internet Browser and run a search for the term.
Any other term or character entered will initiate a search in the current folder and give you a drop down box with the results;
There is no context menu ( Right Click Menu) but left clicking on any of the results will open the file with the default program, or run it.
This is COMPLETELY INDEPENDENT of Windows search, indexing etc.
One has to play around a bit to find all the possibilities!
Regards...Mike Connor | My System Specs | | OS Several, including Windows 7 x64 Ultimate Classic Shell Add On Buttons problems? All times are GMT -5. The time now is 10:30 AM. | |