|
Hack 91. Launch Applications with Command-Line Shortcuts
Launch applications quickly and customize what they do when they run, by using command-line shortcuts, parameters, and switches. Windows is a graphical operating system, but all these pretty icons, menus, and clicking often get in the way of getting work done. That's particularly true when you want to launch applications. I started computing in the days of DOS, when real men and women didn't use mice and icons (sometimes because it wasn't an option). So, I look for any chance I can get to use the command line, particularly when doing so saves me time and lets me take more control of my computer. That's why I frequently launch applications using command-line shortcuts, along with parameters and switches. Parameters and switches let you customize the way programs launch. They're usually specific to each individual program, though some work on many or all programs. An even bigger timesaver is to use the command line along with keyboard shortcuts. That way, you can press a key combinationsuch as Ctrl-Alt-W, for exampleand launch Microsoft Word with a new document open, based on a specific template. 10.5.1. Create Keyboard Shortcuts for Running ApplicationsFirst you'll create a desktop shortcut to the application, and then you'll customize the shortcut so that it launches when you use a specific key combination. Right-click the desktop and choose New Shortcut. Enter or browse to the filename of the application for which you want to create a shortcut Include its path and surround it with quotation marks, such as "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE". Click Next; then, in the "Select a name for the shortcut" box, type the name of your new shortcut (such as Basic Word), and click Finish. Right-click the shortcut you just created and choose Properties. In the Shortcut tab, shown in Figure 10-5, put your cursor in the "Shortcut key" box and press the key combination you want to use to start the program. It has to be a combination of Ctrl-Alt, Shift-Alt, or Shift-Ctrl, plus a letter key, such as Ctrl-Alt-A, Shift-Alt-A, or Shift-Ctrl-A. In our instance, we're using Ctrl-Shift-W. Click OK. Now the program will launch whenever you press the shortcut key combination. Figure 10-5. The Shortcut Properties dialog boxThe Shortcut tab contains a variety of entries that let you customize how the program launches when you use the shortcut. The Run drop-down list lets you start the program minimized, maximized, or in a normal window. The "Start in" box lets you determine the start location for the application. You can even customize the ScreenTip that appears when you hover the mouse cursor over the shortcut. In the Comment box, type the text you want to appear as a ScreenTip. Figure 10-6 shows how such a customized ScreenTip looks when a mouse cursor hovers over it. Figure 10-6. A customized ScreenTip10.5.2. Customizing Shortcuts with Switches and ParametersLaunching applications with a keyboard shortcut is a timesaver, but there's still a lot you can do to customize those shortcuts. For example, you can set up a number of separate keyboard shortcuts for Wordfor example, to launch Word with new documents based on a different template, or to open Word to specific, already-created documents. For example, let's say you want to launch Word and have it automatically open a specific document, one called chapter 9.doc in the C:\Hacks directory. Type this (all on one line) in the Target box displayed in Figure 10-5: "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" "C:\Hacks\chapter 9.doc" Doing this gives you much more control than double-clicking the document or creating a shortcut to the document because, in addition to launching individual files, you can use a variety of switches to customize how you launch those files. For example, let's say you want to launch Word without the splash screen. Use the /q switch, like this: "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" /q Then you can combine switches with opening individual files, like this: "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" /q "C:\Hacks\chapter 9.doc" This command opens the file and bypasses the splash screen. Use keyboard shortcuts along with these switches and syntax to create as many customized versions of Office applications as you like. Tables Table 10-1 Table 10-2, and Table 10-3 list switches for Microsoft's Word, Excel, and PowerPoint, respectively.
10.5.3. See Also
|
|