Those that were use to VistaAudioChanger or STADS in XP to swap between audio devices may have found that like me there was no working version for Windows 7.
Some simple modifications to [Kevin Lo's vbscripts] and [VistaGadgetAudioSwitch] and i've got a working gadget that swaps audio devices.
Instructions
Grab audio switch and drop it's folder into C:\Users\You\AppData\Local\Microsoft\Windows Sidebar\Gadgets
Load up the AudioSwitch.html in notepad and add height:130px; to the css body definition
and the javascript should look like this
var WshShell = new ActiveXObject("WScript.Shell");
function SetAudio(index)
{
switch(index)
{
case 0:
WshShell.Run("Speakers.vbs");
break;
case 1:
WshShell.Run("Headphones.vbs");
break;
default:
break;
}
}
i have two buttons defined, first one is speakers with an onclick value of SetAudio(0), a second headphones button has an onclick value of SetAudio(1)
I would have pasted the complete code but bloody blogger won't allow the html to be displayed - got some reading to do of my own.
Now you have to create the two vbs scripts for headphones and speakers.
My speakers.vbs looks like this (thanks Kevin);
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "%windir%/system32/control.exe /name Microsoft.Sound"
WScript.Sleep(1000)
WshShell.SendKeys "{DOWN}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
WScript.Sleep(1000)
WshShell.SendKeys "{ESC}"
Set WshShell = Nothing
The above script selects the first option in your sound devices list, sets it as the default sound device and then quits the window. You can test the file is correct by just double clicking on it and checking the results. My headphones is the third device so i have an extra couple of WshShell.SendKeys "{DOWN}" before the {TAB} lines and that's named headphones.vbs.
Drop both files to your windows\system32 folder and you're ready to launch your desktop gadget. That's right click on the desktop and select Gadgets. Drag Audio Switch to the desktop and you should have a working audio switcher.
Wednesday, 2 December 2009
Wednesday, 4 November 2009
brief pause in currency transmissions..
Sorry - went on holiday and had to shut down the little server that does all the currency maps. Now it's back on you should see them appearing any day now. I forget the time gap used in generating the change in exchange rate but i think it's a week.
Friday, 9 October 2009
Thursday, 3 September 2009
Tracking Memory Usage in Windows XP
Another personal reminder.
I've been asked to track the memory usage of a colleague's application. It crashes without a trace after two days. So a series of virtual machines are set up to run the software and I'm using windows xp's perfmon to monitor the memory usage - as that's the suspect here.
In Task Manager we have a column called Mem Usage but if we enter the various counter options in perfmon you'll see no such counter. MS provide a breakdown on what memory counters are available for a process and here's the list;
Process : Page Faults/sec. Excessive page faults from a particular process are an indication usually of bad coding practices. Either the functions and DLLs are not organized correctly, or the data set that the application is using is being called in a less than efficient manner.
Process : Pool Paged Bytes.
Process : Pool NonPaged Bytes.
Process : Working Set. This is the current size of the memory area that the process is utilizing for code, threads, and data. - And this is the equivalent to the Mem Usage column you see in Task Manager.
Now I know next to nothing about memory management so I'm not going to pretend I do but one should remember that applications' working sets are allows to grow if free memory is available in abundance.
I've been asked to track the memory usage of a colleague's application. It crashes without a trace after two days. So a series of virtual machines are set up to run the software and I'm using windows xp's perfmon to monitor the memory usage - as that's the suspect here.
In Task Manager we have a column called Mem Usage but if we enter the various counter options in perfmon you'll see no such counter. MS provide a breakdown on what memory counters are available for a process and here's the list;
Process : Page Faults/sec. Excessive page faults from a particular process are an indication usually of bad coding practices. Either the functions and DLLs are not organized correctly, or the data set that the application is using is being called in a less than efficient manner.
Process : Pool Paged Bytes.
Process : Pool NonPaged Bytes.
Process : Working Set. This is the current size of the memory area that the process is utilizing for code, threads, and data. - And this is the equivalent to the Mem Usage column you see in Task Manager.
Now I know next to nothing about memory management so I'm not going to pretend I do but one should remember that applications' working sets are allows to grow if free memory is available in abundance.
Wednesday, 19 August 2009
Streaming music sites
Shame i can't use StreamingSoundtracks (workfirewallslol) but have been recommended a few to try;
http://www.citysounds.fm/ is a fantastic hack from music hack day 2009
and http://radiotime.com has a neat option for different streams
and http://listen.grooveshark.com/ also seems to work. nice.
/personal note rather than a blog
http://www.citysounds.fm/ is a fantastic hack from music hack day 2009
and http://radiotime.com has a neat option for different streams
and http://listen.grooveshark.com/ also seems to work. nice.
/personal note rather than a blog
Wednesday, 15 July 2009
Fix for currency maps
The currency maps are now back. I'll properly test them over the next week. Let me know of any faults.
Monday, 13 July 2009
Subscribe to:
Posts (Atom)