Category : Paradox DBMS
Archive   : TECH91.ZIP
Filename : TI584.ASC

 
Output of file : TI584.ASC contained in archive : TECH91.ZIP







PRODUCT : Paradox NUMBER : 584
VERSION : All
OS : DOS
DATE : September 11, 1991 PAGE : 1/2

TITLE : COPYING RECORDS USING SETKEYS




Description of the CPYNPSTSCRIPT

Frequently in Paradox, when editing or coediting records, the need may
arise to make a copy of a complete record in a table. While Paradox
does provide a Ditto key , the range of this key is limited to
copying a single field.

This example script uses the Pal SETKEY command, in conjunction with
the CopyToArray, and CopyFromArray commands, to provide the function
of copying a complete record in a table.

Creating the CPYNPST script

From the Paradox Main Menu select:

1. Scripts

2. Editor

3. Write

4. At the 'Script:' prompt, type in:

5. CPYNPST

6. Type the following text into the script editor as two single
lines: (Due to printer output constraints, the text of each
single line is printed on two separate lines. Thus, in the
first example, the line which begins with the 'sleep 1000'
should be appended in your editor to the end of the previous
line.)


Line one of text:

SETKEY -46 copytoarray clip message "Copying current record"
sleep 1000; Alt C
Line two of text:

SETKEY -25 ins copyfromarray clip message "Pasting stored
record" sleep 1000; Alt P

7. Press F2 to save the script file CPYNPST.SC













PRODUCT : Paradox NUMBER : 584
VERSION : All
OS : DOS
DATE : September 11, 1991 PAGE : 2/2

TITLE : COPYING RECORDS USING SETKEYS




Using the CPYNPST Script


To initialize the AltC and AltP keys for Cutting and Pasting, select
from the Paradox Main menu:

1. Scripts

2. Play

3. At the 'Script:' prompt type in:

4. CPYNPST

Once the script has been played, the key will store the record
at current cursor position. The key will retrieve the stored
record.


Additional examples/variations


To physically move a record, that is cut and paste a record, the above
example setkeys could be modified as follows:

SETKEY -46 copytoarray clip del message "Cutting current record"
sleep 1000; Alt C

SETKEY -25 copyfromarray clip message "Pasting stored record" sleep
1000; Alt P
An example setkey definition which will ditto the previous record into
the current record position is:

SETKEY -32 up copytoarray x down ins copyfromarray x message "Copying
record" sleep 1000; Alt D

(Again in your script, each setkey definition must be entered on a
single line. See your PAL Manual for a more complete reference of the
setkey command.)
If you wish to have one of these scripts loaded automatically, refer
to Chapter 14 in your Paradox User's Guide for information on INIT
scripts.









  3 Responses to “Category : Paradox DBMS
Archive   : TECH91.ZIP
Filename : TI584.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/