Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:cmd:other:keystack [2014/05/24 06:00] – created valerius | en:docs:cmd:other:keystack [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Using the Keystack ===== | ||
- | |||
- | The Keystack overcomes two weaknesses of input redirection: | ||
- | |||
- | The Keystack sends keystrokes to an application program. Once the Keystack is empty, the program will receive the rest of its input from the keyboard. The Keystack is useful when you want a program to take certain actions automatically when it starts. It is most often used in batch files and aliases. The Keystack is invoked with the **[[KEYSTACK]]** command. | ||
- | |||
- | **KEYSTACK** depends on a program called **KEYSTACK.EXE**. This file must be in the same directory as **CMD.EXE**, | ||
- | |||
- | To place the letters, digits, and punctuation marks you would normally type for your program into the keystack, enclose them in double quotes: | ||
- | |||
- | < | ||
- | [c:\] keystack " | ||
- | </ | ||
- | |||
- | Many other keys can be entered into the Keystack using their names. This example puts the **F1** key followed by the **Enter** key in the keystack: | ||
- | |||
- | < | ||
- | [c:\] keystack F1 Enter | ||
- | </ | ||
- | |||
- | See [[Keys and Key Names]] for details on how key names are entered. See the **[[KEYSTACK]]** command for information on using numeric key values along with or instead of key names, and other details about using the Keystack. | ||
- | |||
- | The following command creates an alias that will run a //FoxPro// report called **TIMEREP** (it should be entered on one line): | ||
- | |||
- | < | ||
- | [c:\] alias timerep `keystack "use times index times" Enter | ||
- | " | ||
- | </ | ||
- | |||
- | This command creates an alias called **timerep** which puts the following characters on the keystack: | ||
- | |||
- | the characters **"use times index times" | ||
- | |||
- | The alias then runs the program //FOXPRO// which receives those characters just as if you had typed them. | ||
- | |||
- | When you use the Keystack, remember that you must put the keystrokes into the Keystack before you run the program that will receive them. The Keystack will hold the keystrokes until the program asks for them. | ||