Friday, November 21, 2008

Paypal micro payments vs. traditional payments

Comparison of PayPal micro payments compared to PayPal traditional payments.
From FrontierDG

Tuesday, November 11, 2008

Super flexible Browser Helper Object that runs vbscript

A gift for all you Vbscripters, your very own Browser Helper Object (BHO). If you're not up to speed on BHO's then checkout the wiki on the subject. The reason this BHO is for Vbscripters is that I've already implemented the plumbing. I've created the BHO but I left it wide open to you to add your own code! Really quite exciting if you are creative and consider the possibilities. BHOs enable you to control the behavior of Internet Explorer and are normally only available to C++, VB, .NET and 'real' programming languages. Using my little BHO, which by the way is named BHO.VBS, you can simply write a script similiar to this... if strcomp(mydoc.url,"http://www.google.com/",1)=0 then set strQ=myDoc.GetElementByID("q") strQ.value="FrontierDG" end if Can you guess what the script does? This script will put the text 'FrontierDG' in the Google search textbox. Pretty neat, huh? Well hopefully you are anxious to try your hand at creating your own script so let's get started. Here's a list of what you need to do... 1. Download my BHO.dll and Input.vbs.

2. Run regsvr32 on the BHO.dll to register the dll.

3. Search for the CLSID of BHO.VBS in the Windows registry.

4. Add the CLSID to the Browser Helper Object section of the Windows registry.

Step 1. Download my BHO.dll and Input.vbs

Download both here. Extract both to a folder somewhere on your computer. The files need to stay together because BHO.dll will 'look' for Input.vbs in the same folder as it is located.

2. Run regsvr32 on the BHO.dll to register the dll.

Ok, once you download and extract the files you need to register the dll. You do this by typing...

regsvr32 c:\path\to\dll\bho.dll and pressing the Enter key. If all went well you'll see dialog that dll succeeded. If it failed write me a note and I'll help.

3. Search the CLSID for our BHO.VBS in the Windows registry.

Fire up Regedit and highlight HKEY_CLASSES_ROOT section, then CTRL+F and search for BHO.VBS. Click the '+' sign next to BHO.VBS and below you should see Clsid. You need to copy the default value of the Clsid it should be this...

{BA57180D-B7DD-418A-A102-65D400315C86}

Copy everything including the curly brackets and more on to step 4.

4. Add the CLSID to the Browser Helper Object section of the Windows registry.

Ok, now you've got to add a key in Browser Helper Object of the Windows registry. In regedit browse to... HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects

and enter new key with the Clsid of the BHO.VBS file (remember from step 3).

Whew, you made it. Pat yourself on the back. Now let's see if it is working. In the Internet Explorer address bar type http://www.google.com/ and press enter. When the Google page appears the search box should have a special message just for you ;)

Now all you need to do modify the behavior of BHO.VBS is modify the Input.vbs file. Start making your own creative changes!

Oh, one more thing. A lot of BHOs are related to adware, spyware, and the like. That doesn't mean that all BHOs are bad. After all Microsoft, Yahoo, Google, and Adobe provide BHOs that are a welcome part of most peoples' Internet Explorer experience.

Still I wanted to provide some safeguard against abuse of BHO.VBS, so every so often a small Windows will appear in the lower right hand corner of the screen that BHO.VBS is running and a link to this blog.

If this is a problem contact me and we can discuss.

Enjoy! :)

Thursday, November 6, 2008

Quckly create a shortcut key to mute / un-mute Windows sound volume

OK, in some previous post I described how to mute Windows using a simple Vbscript file. Then I wrote another post, where I described how to create a hotkey in Windows to mute sound. But, I realize some of you are not interested in how I did it. So are you looking for any easy way to add a keyboard shortcut (hotkey) to mute the sound? Well, for everyone that just wants the quickest way to create a hotkey to mute and unmute Windows I give you... MakeMuteShortcut.vbs. When you click the MakeMuteShortcut.vbs link the Microsoft Windows 'File Download Security Warning' will display and give you a choice of Open, Save, or Cancel.

When you click Open, Windows will display another warning similiar to below...

Click 'Run'. After you click Run, you'll notice that there is a new shortcut icon on your desktop named 'mute'. That's a good indication things went as planned. Now press CTRL + SHIFT + M and Window's volume will be muted. Press the hotkey and again and it will un-mute the sound.

In case you are wondering what weird science took place in the MakeMuteShortcut.vbs, here's the contents...

' by http://frontierdg.blogspot.com
' enjoy :)
set oShell = CreateObject"WScript.Shell")
strDesktop = oShell.SpecialFolders("Desktop")
set fso=createobject("Scripting.fileSystemObject")
set ofile=fso.CreateTextFile(strDesktop & "\mute.vbs",true)
ofile.writeline "set oShell = CreateObject(" & chr(34) & "WScript.Shell" & chr(34) & ")"
ofile.writeline "oShell.SendKeys chr(173) 'mute/ un-mute the sound"
ofile.close

set oShellLink = oShell.CreateShortcut(strDesktop & "\mute.lnk")
oShellLink.TargetPath = strDesktop & "\mute.vbs"
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+M"
oShellLink.Description = "Toggle Mute"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save

...

That's all there is to it. Enjoy :)

Shortcut key to mute and un-mute the volume in Windows (Free, of course)

Create your own keyboard hotkey (or shortcut) to mute/ un-mute the volume in Windows. At one time I had a mute/un-mute button on my keyboard. Well somewhere along the way I replaced my keyboard and discovered that I no longer had a mute volume button on the new keyboard. In the previous post I described an easy way to mute and un-mute the volume using a vbscript. In that post you had to click on the mute.vbs file to mute windows. Not very fast way of muting the volume. First you have to find the mute.vbs file and then click on the icon. A better solution is to use the mute.vbs file and create a shortcut key.

Create a shortcut key to mute the volume in Windows (step-by-step)... (if you'd prefer to just have a shortcut key created for you, check out the end of this post) First copy the next two lines...

Set oShell = CreateObject("WScript.Shell")
oShell.SendKeys chr(173) 'mute / un-mute the sound
and paste them in notepad.exe. Next save the file as mute.vbs to the desktop. After saving the file you can double click on mute.vbs. Everytime you double click on the file it will toggle Windows volume between mute and un-mute. Next create the shortcut and shortcut key so that we can mute/ un-mute the sound using just the keyboard... A new file 'Shortcut to mute.vbs' was create on the desktop. Right click on the new shortcut 'Shortcut to mute.vbs' and choose properties. Then click on the shortcut tab and click in the 'shortcut key' textbox and press the 'm'. Click OK to save. Now whenever you press the CTLR + ALT + M keys you can easily toggle between mute/ un-mute. Create a shortcut key to mute the volume in Windows (the easy way)... If you don't really care to learn how to do this you can always just download the this file and it will create the mute.vbs and shortcut key for you... just click here! Enjoy :)

Wednesday, November 5, 2008

Toggle Mute Volume in Windows using VBScript

One thing that it seems Microsoft has never supplied Vbscript writers with was an easy way to mute the sound on Windows. Here I'll show you the best solution for toggling Windows mute using only VBScript. But, first I'll discuss a less desirable but nevertheless popular option. This option includes using Vbscript sendkeys method, as in this example...
set oshell=createobject("wscript.shell")
oshell.run "sndvol32"
oshell.appactivate "volume control"
wscript.sleep 100
oshell.sendkeys "{tab}+{tab}"
oshell.sendkeys "m "
oshell.appactivate "volume control"
wscript.sleep 100
oshell.sendkeys "%{f4}"
Which is clumsy at best and won't work at worst. With the above example you are using the Master Volume app in Windows, just like you like you would if you launched it from the Windows menu. The only difference is that script launches the master volume control and uses VBScript sendkeys to check the mute checkbox.
This has the effect of the Master Volume control launching and then the invisible hand of sendkeys clicking the mute checkbox. Aside from the distraction of the Master Volume app launching abruptly, this method also has to be timed just right otherwise the sendkey method may send the keystroke to another application entirely. I for one, never like to rely on sendkey when there is a possibility it may not work.

A more desirable option to Mute Window Volume... a simple Vbscript that use the keycode sent from the mute button on some keyboards. Keyboards that include a mute button on the keyboard are able to toggle between mute and unmute. If we knew the keycode that the keyboard mute button was sending to Windows we could use that in our VBScript. But how to find the keycode? Well a few minutes on Google and you can find a solution :). Here's one in Visual Basic 6 (seems appropriate since some Vbscript'ers may be familiar with the mother launguage) http://vbnet.mvps.org/index.html?code/hooks/lowlevelkeyboardproc.htm Just modify it slightly to display the keycode. Well, it doesn't take long to find that when we press the mute button on a keyboard, that has a mute button, the keycode is 173. Great now just create a VBScript that sends keycode to Windows. Here's the script that just sends a simple keycode to windows to mute or un-mute the master volume...

set oShell = CreateObject("WScript.Shell")
oShell.SendKeys chr(173) 'toggle between mute and un-mute
Yep, just two lines of code. Open notepad, copy the two lines and save it to a file named 'mute.vbs'. Now when you double click on the mute.vbs file it will mute and un-mute the master volume.
The advantages of the new script are many but I'll summarize with the most important differences. The old script launched the Master sound volume and had to time the sendkeys just right otherwise it failed. The new script always works!
Works with Windows from Windows 98 to Vista and probably Windows server 2008 too. :)

Enjoy.
Dennis Robins
http://www.windows-password-reset.com/