Company Partners Products Purchase Download Support  
 
 

Exploring
QuicKeys for Windows

Perform actions on multiple files
with the Batch Processor

 

March/April 2005 Exploring QuicKeys Batch Processor (Windows)

The introduction and general description of this tutorial were covered in the March/April 2005 issue of TRIGGERED. This web page is meant to provide more detailed instructions on how to set up and use the Batch Processor action. These instructions assume you are using QuicKeys 2.5 or later and you are running Windows XP.

Part 1: Premise & Preparation

This tutorial will demonstrate the Batch Processor by creating a simple shortcut to modify the margins on a collection of WordPad text files. We'll need to create a source folder containing a text file and duplicate it a few times so we have some material to work with. The Batch Processor itself is a separate Action which simply calls our margins sequence as many times as is necessary to process all of the text files in our source folder.

Before we start working within QuicKeys, let's create our WordPad source files:

1. Open your "My Documents" folder, right click inside that window, and select New -> Folder from the contextual menu that appears. Name the folder "batch source" then double click on that folder to open it.

2. Right click in the "batch source" folder window and choose New -> WordPad Document from the contextual menu that appears. Name this document "file01.doc" or whatever you like. Double-click on this new WordPad document to begin editing it. Add several lines of garbage text, save the document, and close it.

3. In your "batch source" folder, select "file01.doc" and press control+c to copy it, then press control+v four or five times to paste several copies of it. Now we have sufficient dummy documents to make our batch processor's usefulness more apparent.


Part 2: Create a "1 inch margin" Action

We're going to use WordPad to do a very simple operation on each of our text files. The sequence we build will assume you have a text file open in WordPad and will use key presses to select Paragraph from the Format menu. This brings up the paragraph formatting dialog window with the left indent field already selected.

QuicKeys will then press "1" to set a one-inch margin, close the dialog window by pressing "enter", save the document, and close the document window. We could use QuicKeys' recording feature to record and edit this sequence, but creating a sequence this simple is often easier to do by hand.

4. Before we start setting up the sequence, let's make sure we're on the same page as far as the QuicKeys user interface goes. Open the QuicKeys Editor and select Options from the View menu. Uncheck the box named "Always use Setup Wizards for editing" and click the "OK" button. If you want to use QuicKeys Setup Wizards to build actions in the future there is no need to turn this option back on, just select them from the "Setup Wizards" tab in the main QuicKeys Editor window.

5. Time to build the one-inch margin sequence, so select Sequence from the Create menu. Within the resulting sequence window start adding steps to match exactly what is shown in the screen shot at the right. The sequence steps represent the following actions:

  1. Pause for one second to let the batch processor (which we'll build in Part 3) open a file.
  2. Type "Ctrl+A" to select all of the text in the open file.
  3. Type "Alt+O" to open the Format menu.
  4. Type "P" to select the Paragraph menu item and open the paragraph format window.
  5. Type "1" to set the left margin indent to one inch.
  6. Type "Enter" to OK/close the Paragraph formatting window.
  7. Pause for half a second so you can actually see the results of the previous steps. Without the Pause the sequence runs too fast to see what is happening.
  8. Type "Ctrl+S" to save the current document.
  9. Type "Alt+F" to open the File menu.
  10. Type "X" to close the current document window.

6. Name your completed sequence "1 inch margin" and give it a hot key (I used F9). Make sure the Action Scope is set to "Universal". This may seem counter-intuitive for an action meant to control WordPad only, but the Batch Processor Action requires the sequence it controls to be scoped to Universal.

7. Click Save & Exit, then open your file01.doc text file and press the hot key for your newly created sequence. If the sequence completes successfully, you're ready to add the batch processor to the mix.

Part 3: Create the Batch Processor Action

Go to QuicKeys' Create menu and select File & Folder Tools -> Batch Processor. Set up your Batch Processor action so it looks exactly like the screenshot at left. The more important settings are explained:

Source folder: This is the location of the files you want to manipulate with your sequence and your batch processor.
Backup source folder: Makes a copy of your original files before beginning the batch process. A good idea when working with real data!
Skip read-only files: If you don't have permission to modify a file, it skips processing that file.
Open with: Here you must designate which program the batch processor should use to open the source files.
Run sequence: Here you designate which sequence is to be run on each of the source files.
Show results window ...: Displays a window with the processing results when the batch processing job is completed.
Log results to a file: Saves the batch processing job results to a log file in the same location as the source folder.

Give your batch processor a suitable name and hot key then Save & exit. Make sure you close all WordPad documents, then press the batch processor hot key and you should see each of your source files in turn be opened and the text indented. A quick edit of your "1 inch margin" sequence (change step 5 from typing "1" to typing "0") and another pass of the Batch Processor will put the indents back to zero.

Batch Processor tips

Remember the following guidelines when you create a QuicKeys Sequence for a Batch Processor Action:

  • Do not include steps in your Sequence that open the program or files; Batch Processor performs these actions as part of its standard operation. You should begin your Sequence assuming the file is already opened.
  • Batch Processor Actions cannot work smoothly with programs that display splash screens or informational dialogs when launched. For example, some programs display a “Tip of the Day” window on startup. To avoid conflicts with Batch Processor, you should turn these types of dialogs off.
  • You should begin your Sequence with a Pause Action to allow each source file to be opened.
  • Make sure your Sequence contains a step that saves the file.
  • Test and debug your Sequence before using it in the Batch Processor Action.
  • Some programs will launch multiple times during a Batch Processor Action. If this happens, add a step to the end of your Sequence to exit the program.
 
 
contact us join lists trademarks privacy sitefeedback