Jump to content

My Vista Sidebar Gadgets


jaws75

Recommended Posts

Vista comes with a task manager. Is he asking for a gadget to access the task manager from the sidebar? I just do a desktop shortcut myself.
I'm not sure what to do next.
How about a Task Manager Gadget...

Ive seen manny Run Command Gadgets that can Run Programs but how about one that can both Run and Kill them :P (also Log off and the other cool stuff taskmgr does)

So Vista doesn't come with its own taskmanager and you have to make one yourself? :wacko:

Right-click taskbar -> Task Manager :)
Link to comment
Share on other sites


I hope you plan on posting these on the official Microsoft site. They are both excellent gadgets and can help to convert those that think gadgets are worthless.

I have no plans to at this moment. Maybe when they've been tweaked a bit. I have a month until Vista is released into the wild.

Anyone know of a sidebar gadget that will look up my Minutes on my Cingular Wireless account like the Firefox extension?

Give me some info on how the data is retrieved and I may be able to do it.

Link to comment
Share on other sites

jaws75 keep up the good work :thumbup

Here is a js script that you may be able to use to make a sidebar gadget that act like task manager.

var Act, Drv, fso , File;
fso = new ActiveXObject("Scripting.FileSystemObject");
Act = new ActiveXObject("Wscript.Shell");
File = Act.ExpandEnvironmentStrings("%SystemDrive%\\ListProcess.hta");
var a = fso.CreateTextFile(File, true);
a.writeline (" <HEAD><TITLE> Gsm_List Process</TITLE>");
a.writeline (" <HTA:APPLICATION ID= \"Gsm_List Process\" SCROLL= \"Yes\" SCROLLFLAT =\"No\" SingleInstance= \"Yes\" ");
a.writeline (" ShowInTaskbar=\"Yes\" SysMenu= \" No \" Border= \" Thin \" BORDERSTYLE = \" complex \" INNERBORDER =\"No\" ");
a.writeline (" Caption=\"Yes\" WindowState=\"Normal\" APPLICATIONNAME=\"Gsm_List Process\">");
a.writeline ("<!-- ================================================ -->");
a.writeline (" <style>");
a.writeline (" /* BODY CSS STYLE */");
a.writeline (" Body.Normal");
a.writeline (" {8.25pt Palatino Linotype; color:#000080;filter:progid:DXImageTransform.Microsoft.Gradient");
a.writeline (" (GradientType=0, StartColorStr='#e8e4de', EndColorStr='#c7c3be')}");
a.writeline (" /* GENERAL CSS STYLE USED BY THE TBODY CLASS */");
a.writeline (" .TKT2");
a.writeline (" {font-size:10.75pt;font-family:Palatino-Linotype;font-weight:Bold-Italic;line-height:110%;");
a.writeline (" color:#0926ed;background-color:#c7c3be;filter:progid:DXImageTransform.Microsoft.Gradient");
a.writeline (" (GradientType=0,StartColorStr='#c7c3be',endColorStr='#e8e4de');padding-top:3;padding-bottom:3;");
a.writeline (" padding-left:8;padding-right:8;margin-right:8;}");
a.writeline (" /* BUTTON CSS STYLE */ ");
a.writeline (" .BTN1");
a.writeline (" {font-size:9.75pt;font-family:Palatino-Linotype;font-weight:Bold-Italic;line-height:110%;");
a.writeline (" color:#008000;background-color:;filter:progid:DXImageTransform.Microsoft.Gradient");
a.writeline (" (GradientType=0,StartColorStr='#c7c3be',endColorStr='#e8e4de');padding-top:2;padding-bottom:2;");
a.writeline (" padding-left:2;padding-right:2;margin-right:2;Width:95;Height:25;}");
a.writeline (" /*TD CSS STYLE */ ");
a.writeline (" TD.BTN2");
a.writeline (" {font-size:9.75pt;font-family:Palatino-Linotype;font-weight:Bold-Italic;line-height:110%;");
a.writeline (" color:#008000;background-color:;filter:progid:DXImageTransform.Microsoft.Gradient");
a.writeline (" (GradientType=0,StartColorStr='#c7c3be',endColorStr='#e8e4de');padding-top:3;padding-bottom:3;");
a.writeline (" padding-left:8;padding-right:8;margin-right:8;}");
a.writeline (" </style>");
a.writeline ("<!-- ================================================ -->");
a.writeline ("<script LANGUAGE =\"VBScript\"> window.resizeTo 520,705 : window.moveTo 250,75");
a.writeline (" Dim Act, Fso, FR_Name, MB, Mem, Sd, SP_PID, SP_Name, strComputer, Tkill, Ts, Txt_Line, Uname");
a.writeline (" Set Fso = CreateObject(\"Scripting.FileSystemObject\")");
a.writeline (" Set Act = CreateObject(\"Wscript.Shell\")");
a.writeline (" Sd = Act.ExpandEnvironmentStrings(\"%SystemDrive%\") : Uname = Act.ExpandEnvironmentStrings(\"%UserName%\")");
a.writeline (" strComputer = \".\" : MB = 1024 * 1024");
a.writeline (" Set objWMIService = GetObject(\"winmgmts:{impersonationLevel=impersonate}!\\\\\" & strComputer & \"\\root\\cimv2\")");
a.writeline (" Function window_onLoad");
a.writeline (" GetInfo : iTimerID = window.setInterval( \" GetInfo\" , 300, \"VBScript\")");
a.writeline (" Lb1.InnerHtml = Uname & \"<BR> Process List\"");
a.writeline (" End Function");
a.writeline (" Function GetInfo");
a.writeline (" For i = (objTable.Rows.Length - 1) to 0 Step -1");
a.writeline (" myNewRow = document.all.objTable.deleteRow(i)");
a.writeline (" Next");
a.writeline (" Set objRow = objTableBody.InsertRow() : objRow.Style.fontWeight =\"Bold\"");
a.writeline (" Set objRow = objTable.InsertRow() : objRow.Style.Color =\"Red\"");
a.writeline (" Set objCell = objRow.InsertCell() : objCell.InnerText =\"Process ID\"");
a.writeline (" Set objCell = objRow.InsertCell() : objCell.InnerText =\"Process Name\"");
a.writeline (" Set objCell = objRow.InsertCell() : objCell.InnerText =\"Memory Usage\"");
a.writeline (" Set colProcesses = objWMIService.ExecQuery(\"SELECT * FROM Win32_Process\")");
a.writeline (" For Each strProcess in colProcesses");
a.writeline (" SP_PID = strProcess.ProcessID : SP_Name = strProcess.Name");
a.writeline (" FR_Name = FormatNumber(strProcess.WorkingSetSize,0,,,-1) /1024");
a.writeline (" Txt_Line = Space(5) & SP_PID & space(5) & SP_Name & space(5) & FR_Name");
a.writeline (" Set objRow = objTableBody.InsertRow()");
a.writeline (" Set objCell = objRow.InsertCell()");
a.writeline (" objRow.Style.Color =\"#0000C8\"");
a.writeline (" objRow.Style.fontWeight =\"Bold\" ");
a.writeline (" objCell.InnerText = strProcess.ProcessID");
a.writeline (" Set objCell = objRow.InsertCell() : objCell.InnerText = strProcess.Name");
a.writeline (" Set objCell = objRow.InsertCell()");
a.writeline (" Mem = FormatNumber(strProcess.WorkingSetSize,0,,,-1) / MB");
a.writeline (" Mem = Left(Mem,4) : objCell.InnerText = Mem & \" Mb\"");
a.writeline (" Next");
a.writeline (" End Function");
a.writeline (" Function KillTask");
a.writeline (" Tkill = InputBox( \"Type In The Name Of The Process To Kill\" ,\"Task Kill Process\",,5500,4800)");
a.writeline (" If Tkill = \"\" Then : window.Alert \"User Has cancel Task Kill\" : End If");
a.writeline (" If Tkill <> \"\" Then");
a.writeline (" Set colProcessList = objWMIService.ExecQuery(\"Select * from Win32_Process Where Name = '\" & Tkill & \"'\")");
a.writeline (" For Each objProcess in colProcessList : objProcess.Terminate() : Next");
a.writeline (" End If");
a.writeline (" Exit Function");
a.writeline (" End Function");
a.writeline (" Function HTAEXIT");
a.writeline (" If Fso.FileExists(Sd & \"\\ListProcess.hta\") Then : Fso.DeleteFile(Sd &\"\\ListProcess.hta\") : End If ");
a.writeline (" Window.close");
a.writeline (" Exit Function");
a.writeline (" End Function");
a.writeline (" </SCRIPT></Head>");
a.writeline ("<!-- ================================================ -->");
a.writeline (" <body SCROLL=\"Yes\" CLASS=\"Normal\"><Table WIDTH=\"455\" ALIGN=\"Center\">");
a.writeline (" <TD CLASS=\"BTN2\"><TABLE WIDTH=\"425\" ALIGN=\"Center\">");
a.writeline (" <TD><input TYPE=\"button\" LANGUAGE=\"vbscript\" VALUE=\"Kill Process\" CLASS=\"BTN1\" ONCLICK=\"KillTask\"></TD>");
a.writeline (" <TD> </TD>");
a.writeline (" <TD CLASS=\"BTN2\" WIDTH=\"275\" ALIGN=\"Center\"><SPAN ID=\"Lb1\"></SPAN></TD>");
a.writeline (" <TD> </TD>");
a.writeline (" <TD><input TYPE=\"button\" LANGUAGE=\"vbscript\" VALUE=\"Exit App\" CLASS=\"BTN1\" ONCLICK=\"HTAEXIT\"></TD></Table>");
a.writeline (" <TABLE ID =\"objTable\" CLASS=\"TKT2\" Width=\"425\"><TBODY ID =\"objTableBody\" CLASS=\"TKT2\" Width=\"425\">");
a.writeline (" </TBODY></TD></TABLE>");
a.writeline (" <TD> </TD>");
a.writeline (" <Table ALIGN=\"Center\"><TD>");
a.writeline (" <input TYPE=\"button\" LANGUAGE=\"vbscript\" VALUE=\"Kill Process\" CLASS=\"BTN1\" ONCLICK=\"KillTask\">");
a.writeline (" </TD></Table></Body>");
a.close();
Act.Run(File,1,true);

Edited by gunsmokingman
Link to comment
Share on other sites

Anyone know of a sidebar gadget that will look up my Minutes on my Cingular Wireless account like the Firefox extension?

Give me some info on how the data is retrieved and I may be able to do it.

If i were better with java i would modify this myself, and hopefully you may be able to. The following links are for the "Cingular Minute Minder" FireFox addon. The first is the JS file that handles the login and stuff and the second is a link to the rest of the files related to it. It is all open source code

cingular.js

Source CVS repository

Link to comment
Share on other sites

App Launcher Gadget

updated to v2.0

This is a complete reworking of the MS Launcher gadget from an early beta of Vista.

I don't know why they didn't include this in Vista final.

It allows you to launch apps from the sidebar by clicking the icon.

Changes from original:

many...

-I removed the ability to drag and reorder apps from the main display. I added up and down arrows in the settings page to reorder them instead. (much cleaner code)

-I added the highlight feature and cursor change when hovering apps. (update: now icons grow when hovered)

-Added title attributes to links. (only works when gadget is focused window)

-I changed the max apps from 20 to 24.

-Added Control Panel, My Computer and Recycle Bin.

bla bla bla...

Screen shots:

launcherfolder.jpg

rbE.png

launcherSet.jpg

Notes:

settings that can be changed in launcher.js

var showTitle = "no"; // whether the path to the app is shown when hovering over the icon

var makeIconBigger = "yes"; // sets whether the icons grow when hovered over. yes or no

var showHighlight = "no"; //sets whether the icon is highlighted when hovered

Drag and drop:

Starting v1.8 you can drag and drop files or folders to the App Launcher.

Defaults:

There is a file named defaults.txt in the gadget folder. You can add apps to start with when first launched. You can also change the Control Panel view by changing the

Control Panel Classic

to Control Panel Category

or Control Panel VAIO ----------(XP VAIO users only)

Example defaults.txt entry

C:\Windows\System32\SnippingTool.exe

Try to avoid blank lines in defaults.txt.

Updates:

v2.0

Now included is My Computer, Control Panel and Recycle Bin. With Recycle Bin you can empty the bin, view contents and change settings.

v1.9

Complete rewrite of the launcher.

Fixed important bugs.

v1.8

Added Drag and Drop. :thumbup

You can make a defaults.txt file and add your defaults to use when first loaded. See above

Debug option. Create a debug.txt file in the gadget folder and run the Launcher. Any errors will get written to that file.

Download:

Latest version at the MS gallery

here

Edited by jaws75
Link to comment
Share on other sites

How about a sticky note type gadget for the sidebar that allows you to do short notes and email them right from the sidebar without starting up an email client? I remember seeing something like this on the MS gadget site but it was removed for some reason.

If your gadget series gets larger maybe we could consider some sort of code repository where the source code for user created gadgets could be stored and available for sharing. It would be great to have a source for people to consult when building their own gadgets. After all...if some working code has already been developed that people can use to plug into their own designs then why re-invent the same code over and over again.

Your doing a great job with these, keep it up. :)

Link to comment
Share on other sites

Can someone port the Timer gadget plz for RC2 and RTM
This was a very quick port. The background image causes it to look funny but it works. (pink ridges)

Fix the image problem and it will look good.

Update: I did a simple test with g:background and it's working (no pink fringe) stay tuned.

oops missed one setting... re upped it.

Get it here (still pink fringe)

How about a sticky note type gadget for the sidebar that allows you to do short notes and email them right from the sidebar without starting up an email client? I remember seeing something like this on the MS gadget site but it was removed for some reason.

I'll take a look.

Edited by jaws75
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...