O'Reilly logo

Skype Hacks by Andrew Sheppard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #44. Accelerate Skype Using Your Keyboard

Make Skype fly, by speeding up common tasks with key sequences and hotkeys.

Works with: Windows version of Skype.

If you're proficient with the keyboard, sometimes driving Skype in this way can be easier, and faster, than if you use the mouse. Even if you're not one of these people, this hack will nevertheless help you speed up some Skype tasks.

Tip

If you're visually impaired in some way, or if your motor skills with the mouse aren't quite what they used to be, or if you merely help such a person with their computer activities, you will find this hack very useful in terms of configuring Skype to make it easier to use.

Skype has the ability to control a very limited amount of its functionality using global hotkeys (see Figure 4-5). You can set these by selecting Skype → Tools → Options… → Hotkeys.

Skype's global hotkeys option dialog

Figure 4-5. Skype's global hotkeys option dialog

Skype's global hotkey feature, though useful, is somewhat limited.

Another option is to drive Skype's GUI using key sequences. In this case, there's almost nothing you can do with the mouse that you cannot do with a key sequence entered at the keyboard. But if you want to use this approach, your efforts will be made a lot easier if you first set up a hotkey sequence to open Skype and give it focus. Once you do that, it will be a lot easier to drive Skype's GUI via the keyboard.

One method is to set a global hotkey sequence to Focus Skype (see Figure 4-5). However, this method has the annoying habit of minimizing Skype if it's already open! What we want is a foolproof way of always bringing Skype to the foreground and giving it focus wherever it may presently be lurking—behind another window, or in the system tray, or not running at all! Fortunately, such a method exists in the form of a hotkey sequence for a shortcut to Skype.exe. Create a shortcut that points to Skype.exe as its target, and then right-click on the shortcut and choose Properties. In the shortcut properties dialog that is displayed, select the Shortcut tab, click on the text entry field opposite "Shortcut key," press the key sequence you want as your hotkey (for example, Ctrl-Shift-S), and then click OK. Now you have a hotkey sequence that will bring Skype to the foreground of your desktop and give it focus—no matter where it might be hiding!

On my machine, I have the hotkey sequence Ctrl-Shift-S set up so that it always opens Skype and gives it focus. You may have to choose something different if this hotkey sequence conflicts with a hotkey sequence that already exists on your machine. However, for the remainder of this hack, we'll assume that Ctrl-Shift-S works as desired; but remember, it doesn't really matter what it is, just replace Ctrl-Shift-S in this hack with whatever you have set up instead.

Now we're ready to start driving Skype. Let's try some Skype keyboard acceleration:

Ctrl-Shift-S, Alt-F, Enter, A

Will change your online status to Away.

Ctrl-Shift-S, Alt-T, R, Enter

Will reopen your most recent chat session.

Ctrl-Shift-S, Alt-T, L

Will clear your call list.

Ctrl-Shift-S, Ctrl-Tab (repeat)

Will cycle through the tabs (Contacts, Dial, and Call List) in the Skype application window.

Ctrl-Shift-S, Alt-{down arrow}, Enter

Will repeat the last call you made from the Skype address bar.

Don't be afraid to experiment, as it often takes a little trial and error (and sometimes a notepad and pencil) to find the right key sequence for what you want to do. This method works best, of course, when key sequences are short, as they're obviously easier to remember. However, even complex key sequences can be put to good use, and I'll show how next.

Hacking the Hack

Think of the following simple script, drive_skype.vbs, as a car you're meant to drive. You don't have to be a mechanic or look under the hood to drive a car, and so it is with this script. Just download the script from the book's web site (http://www.oreilly.com/catalog/SkypeHacks/index.html) and start using it to make Skype fly!

Warning

This script uses the Windows Scripting Host (WSH), which comes with Windows XP but must be downloaded (from http://www.microsoft.com/) and installed separately for Windows 2000.

	' File: drive_skype.vbs

	' Invoke like this from the run-line:
	'       drive_skype "^+S|%(TO)"
	' where "^+S|%(TO)" is the key sequence to be sent to
	' the Skype GUI (in this case ctrl+shift+S,
	' followed by alt+T then alt+O)

	Dim objShell, objArgs, keystrokes, keys, pause
	Set objShell = WScript.CreateObject("WScript.Shell")
	Set objArgs = WScript.Arguments
	keystrokes = Split(objArgs(0), "|")
	pause = 1500
	For Each keys In keystrokes
	    objShell.SendKeys keys
	    WScript.Sleep pause
	    If pause>100 Then pause=100 End If
	next

To run this script, you will need to enter something like "C:\Scripts\drive_ skype.vbs" "^+S|%(TO)" at the run line (Start → Run…), or use a similar command as the target of a shortcut (with or without a hotkey sequence assigned to it). Of course, if you put drive_skype.vbs in a folder on your path, you can dispense with C:\Scripts\.

Warning

When I ran drive_skype.vbs from the command line in a command prompt window, it produced inconsistent results. It seems that sometimes, the command window grabs focus away from Skype before all the keystrokes have been sent to Skype. For this reason, I recommend that you run VBScripts that drive Skype's GUI (specifically, scripts that use the SendKeys command) using the run line, or as the target of a shortcut.

Let's look at some examples—and the power—of this simple script:

  • drive_skype.vbs "^+S|%(TO)", if made into a shortcut and assigned a convenient hotkey sequence—say, Ctrl-Shift-O—will display the options dialog for Skype.

  • drive_skype.vbs "^+S|%(TO)|{TAB}|{TAB}|{DOWN}|{DOWN}|{DOWN}|{DOWN}| {TAB}|{TAB}|L|{TAB}|L|{TAB}|L|{TAB}|{TAB}|{TAB}|{ENTER}" will, in my case, set the sound input and output device used by Skype to Logitech USB Headset (note the L in the script). An identical key sequence, but with L replaced with C, will, again in my case, set the sound input and output device used by Skype to C-Media USB Headphone Set. These two key sequences enable me to hot-switch between sound devices in a snap—even during the middle of a call! To use the key sequence yourself, simply experiment with replacing the L.

  • drive_skype.vbs "^+S|%(TC)|Progress_Report|{TAB}|{DOWN}|{UP}| +({DOWN}{DOWN}{DOWN}{DOWN})|{TAB}|{TAB}|{ENTER}|{ENTER}" will start a conference call with the topic Progress_Report for the first four contacts in your Contacts list.

Clearly, some of the examples given here would stretch anyone's memory capacity, but when you use them in combination with the simple script presented in this hack, as well as with shortcuts, they can be extremely useful and great timesavers.

To help you explore the full power and possibilities of using drive_skype.vbs to drive Skype's GUI, here's a short crib sheet of the possible key sequences:

Letter keys

A–Z and numbers 0–9.

Special keys

+ for Shift, % for Alt, and ^ for Ctrl.

Function keys

{F1} through {F16}.

Tab and Enter keys

{TAB} and {ENTER}.

Arrow keys

{UP}, {DOWN}, {LEFT}, and {RIGHT}.

Miscellaneous keys

{BACKSPACE}, {BREAK}, {CAPSLOCK}, {DELETE}, {END}, {ESC} escape, {HELP}, {HOME}, {INSERT}, {NUMLOCK}, {PGDN} page down, {PGUP} page up, {PRTSC} print screen, and {SCROLLLOCK}. I've provided descriptions only for nonobvious keys.

Sequence of keys

To hold down one key—say, Alt (which is represented by %) and then press the keys T and O in sequence—all while holding down Alt, simply put the key presses in round brackets, like this: %(TO).

Now you are in a position to experiment for yourself. Using keyboard key sequences can really make Skype fly, and all it takes is a willingness to experiment, a systematic approach (having a notepad and pencil close by helps), and some imagination. Once a key sequence has been well thought out and tested, this way of using Skype can be both faster and less error prone than using the manual keyboard or the mouse!

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required