home *** CD-ROM | disk | FTP | other *** search
/ Computerworld 1996 March / Computerworld_1996-03_cd.bin / idg_cd3 / aplikace / komunika / telixwin / tfw.5 / MACRO.SLT < prev    next >
Text File  |  1995-07-28  |  1KB  |  29 lines

  1. /****************************************************************/
  2. /*                                                              */
  3. /*  Demo of how to use keyboard macro tables from within a      */
  4. /*  SALT script file.                                           */
  5. /*                                                              */
  6. /*                   Copyright 1995 deltaComm Development, Inc. */
  7. /*                                                              */
  8. /****************************************************************/
  9.  
  10. main()
  11. {
  12.  str ss[100];
  13.  
  14.  keysave("temp.key", 0);           // Save the current macro table
  15.  keyload("test.key", 0);           // Load a different macro table
  16.  keyget(0x3b00, 0, ss);            // Get the f1 macro from the new table
  17.  
  18.  if (!strposi(ss, "F1", 0))        // Test the macro; does it contain "F1"?
  19.   {
  20.    ss="F1";                        // If not, make it so, number F1, and save.
  21.    keyset(0x3b00, 0, ss);
  22.    keysave("test.key", 0);
  23.   }
  24.  
  25.  keyload("temp.key", 0);           // Reload original macros
  26.  fdelete("temp.key");              // Delete the temporary file we saved above
  27. }
  28.  
  29.