home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / tech91.zip / TI584.ASC < prev    next >
Text File  |  1991-08-26  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                     NUMBER  :  584
  9.   VERSION  :  All
  10.        OS  :  DOS
  11.      DATE  :  August 26, 1991                               PAGE  :  1/2
  12.  
  13.     TITLE  :  COPYING RECORDS USING SETKEYS
  14.  
  15.  
  16.  
  17.  
  18.                       Description of the CPYNPSTSCRIPT
  19.  
  20.   Frequently in Paradox, when editing or coediting records, the need may
  21.   arise to make a copy of a complete record in a table.  While Paradox
  22.   does provide a Ditto key <CtrlD>, the range of this key is limited to
  23.   copying a single field.
  24.  
  25.   This example script uses the Pal SETKEY command, in conjunction with
  26.   the CopyToArray, and CopyFromArray commands, to provide the function
  27.   of copying a complete record in a table.
  28.  
  29.                         Creating the CPYNPST script
  30.  
  31.   From the Paradox Main Menu select:
  32.  
  33.      1.  Scripts
  34.  
  35.      2.  Editor
  36.  
  37.      3.  Write
  38.  
  39.      4.  At the 'Script:' prompt, type in:
  40.  
  41.      5.  CPYNPST<ENTER>
  42.  
  43.      6.  Type the following text into the script editor as two single
  44.          lines: (Due to printer output constraints, the text of each
  45.          single line is printed on two separate lines. Thus, in the
  46.          first example, the line which begins with the 'sleep 1000'
  47.          should be appended in your editor to the end of the previous
  48.          line.)
  49.  
  50.  
  51.   Line one of text:
  52.  
  53.        SETKEY -46 copytoarray clip message "Copying current record"
  54.        sleep 1000; Alt C
  55.   Line two of text:
  56.  
  57.        SETKEY -25 ins copyfromarray clip message "Pasting stored
  58.        record" sleep 1000; Alt P
  59.  
  60.       7. Press F2 to save the script file CPYNPST.SC
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                     NUMBER  :  584
  75.   VERSION  :  All
  76.        OS  :  DOS
  77.      DATE  :  August 26, 1991                               PAGE  :  2/2
  78.  
  79.     TITLE  :  COPYING RECORDS USING SETKEYS
  80.  
  81.  
  82.  
  83.  
  84.                          Using the CPYNPST Script
  85.  
  86.  
  87.   To initialize the AltC and AltP keys for Cutting and Pasting, select
  88.   from the Paradox Main menu:
  89.  
  90.      1.  Scripts
  91.  
  92.      2.  Play
  93.  
  94.      3.  At the 'Script:' prompt type in:
  95.  
  96.      4.  CPYNPST<ENTER>
  97.  
  98.   Once the script has been played, the <AltC> key will store the record
  99.   at  current cursor position.  The <ALTP> key will retrieve the stored
  100.   record.
  101.  
  102.  
  103.                       Additional examples/variations
  104.  
  105.  
  106.   To physically move a record, that is cut and paste a record, the above
  107.   example setkeys could be modified as follows:
  108.  
  109.   SETKEY -46 copytoarray clip del message "Cutting current record"
  110.   sleep 1000; Alt C
  111.  
  112.   SETKEY -25 copyfromarray clip message "Pasting stored record" sleep
  113.   1000; Alt P
  114.   An example setkey definition which will ditto the previous record into
  115.   the current record position is:
  116.  
  117.   SETKEY -32 up copytoarray x down ins copyfromarray x message "Copying
  118.   record"  sleep 1000; Alt D
  119.  
  120.   (Again in your script, each setkey definition must be entered on a
  121.   single line.  See your PAL Manual for a more complete reference of the
  122.   setkey command.)
  123.   If you wish to have one of these scripts loaded automatically, refer
  124.   to Chapter 14 in your Paradox User's Guide for information on INIT
  125.   scripts.
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.