Quick Script to Show/Hide Windows Gadgets
This is written for Windows 7, since it runs all Gadgets in the same process. It shouldn't be too difficult to modify it for Windows Vista.
Basically all this does is provides you with a quick way to start and stop Gadgets on your computer. Save it as a batch file called "gadgets.cmd" in your %PATH% and you can Windows + R and type 'gadgets' to quickly toggle them on and off.
Another cool idea is to download WinHotKey and map the batch file to a Windows keyboard shortcut.
Windows + G brings gadgets to the front
Try mapping Windows + Alt + G to show/hide gadgets entirely!
The script loops through running processes, looks for the sidebar process (outputting to a variable, which is more elegant than most solutions I could find) and either starts it or stops it as necessary.
@echo off
setlocal enableextensions
REM Look for sidebar in running processes...
for /f "tokens=1" %%a in (
'tasklist /fi "IMAGENAME eq sidebar.exe"'
) do (
set myvar=%%a
)
if %myvar% == sidebar.exe GOTO found
REM If its not running, start it
echo "Starting Gadgets..."
c:
cd\
cd "program files"
cd "windows sidebar"
start sidebar >nul
GOTO end
REM If it IS running, kill it
:found
echo "Killing Gadgets"
taskkill /f /im sidebar.exe
:end
endlocal
Update: Combine with this tip for hiding Desktop icons for a more thorough desktop de-clutterer.
Update 2: And here's an app for togglilng auto-hide on the Taskbar.
Code Poetry
Categories
Tag Cloud
Most Popular Posts
- Turning a Mac Mini into an AppleTV
- Installing NextStep 3.3 on VMWare 6
- WordPress Hacking: Multiple Blogs On One Set of Tables
- Using Mail.app with multiple users -- using AppleScript!
- AppleTV for Mac
- XBox360 + Connect360 + Linksys WRT54g (firmware hacked)
- Controlling a Hyper-V Server with a Remote Client
- Clean up Google Mail Folder Structure on your iPhone
- Using Mail.app with multiple users — using AppleScript: Part 2
- Downloads
Recent Comments
- Wise on Tech | Using AppleScript and a Shell Script to Restart an AppleTV remotely on Restart TwonkyMedia after scheduled sleep
- Wise on Tech | Using PHP and a Shell Script to Restart an AppleTV remotely — via the web on Using AppleScript and a Shell Script to Restart an AppleTV remotely
- Mike on Using Mail.app with multiple users — using AppleScript!
- Jaks Web Design – Single WordPress Database with Multiple Themes on WordPress Hacking: Multiple Blogs On One Set of Tables
- Dave Bonhoff on Windows 7 Media Center + Extender vs. Mac OS X + AppleTV = not a fair fight.