home *** CD-ROM | disk | FTP | other *** search
/ ftp.cc.umanitoba.ca software / ftp.cc.umanitoba.ca-software-.zip / ftp.cc.umanitoba.ca-software- / mac_network / Comet.3.0.7.sit.bin / Comet3.0.7.rsrc / TEXT_2012.txt < prev    next >
Text File  |  1994-01-31  |  12KB  |  173 lines

  1.     
  2.  
  3.          USING MACROS
  4.  
  5.    Comet allows you to record macros to perform functions such as moving the cursor, making a selection, or appending the selection to a file.  Macros can be entered and executed in the .edit window.  Pressing the Enter key while the .edit window is the frontmost window causes the current line or selection to be executed as a macro.  
  6.  
  7.    Dialogs in the Control menu allow you to paste in or enter a sequence of macro commands; you can trigger a macro with key-combinations (such as Control Option A) you enter on the keyboard or the mouse double-click (using ("Define key macros" or "Set double-click macro" in the Control menu).  You can also define a macro to execute when a connection with a host is complete ("Set Connection macro...") or when the user closes the connection ("Set Close macro...").
  8.  
  9.    The Key Macro on/off switch is in the Control menu; when macros are on, an M appears in a box on the right hand side of the screen.  When a key macro is currently executing, the M appears in reverse video; the reverse M also appears if keystrokes are pending execution in the key queue.  If you wish to cancel the execution of a macro or pending keyststrokes, use Command-'.'.
  10.  
  11.    When the dialog for entering key macros comes up, you have three options:  select a key, get help, show a list of macros currently associated with keys, or quit the dialog.  A prompt appears saying "You may press a key-combination to modify the macro for that key..."  If you press a key-combination, the dialog will show you the name of the key, and will allow you to enter actions (text and commands) you want the key-combination to produce.  If there is a key macro associated with that key, the Delete key will be turned on, and the actions associated with the key will be displayed.  Note that holding down the mouse button when you press the key-combination will identify the key as an "Alt-key," and such a macro will only be matched if the "ALT" state is set using the "!CA" command documented below (this allows you to switch keyboard configurations with a keystroke, and is used with library keymapping--see the "ALA" Comet configuration document for an example of extensive key remapping).  When the "ALT" state is on, the boxed "M" which shows that key macros are on changes to an "m" . 
  12.  
  13.    You can modify the macro text by entering new text or using copy and paste with the Command-C and Command-V keys.  Command-. cancels your modifications to the key macro.  When you are finished, you must press the Set button if you want the changes to take effect. The program will then alert you if your entry has errors in the length of the codes.  (PLEASE NOTE that the codes are not checked for validity until you execute a key macro by typing the key when you have quit the dialog and Key Macros are set on!  Alerts will then inform you of any errors.)   If there is no error, the macros are updated immediately; there is no need to save the configuration to save the key macros in the document.  If you decide not to change the text, you should press the Cancel button.  You can then quit if you wish, or add, remove, or modify other keys.
  14.  
  15.    Text which you enter in the key macro window can be interpreted as either plain text or commands.  Individual characters stand for themselves--except for '!' & '\', which can be entered by using '!!' and '\\'.  These two characters are special:  '!' is used to introduce a command; '\' is used to enter a number, specified using three decimal digits, such as "\010".   This numeric entry can be used either in place of a character, or to enter a decimal numeric value.  
  16.  
  17.    ASCII control characters can be entered by pressing the option key and the character ('a' through 'z', Space, '[', ']', '\', '@', '^', '_', or '?').  
  18.  
  19.    Ordinary text can be entered directly in the text-editing field of the dialog.  Commands are entered as a '!' (exclamation point) followed by a pair of characters; the first character selects a class of action, and the second the particular type of this action.   In IBM mode, the macro dialogs present buttons to perform input of all the IBM function keys.  (PLEASE NOTE that versions of Comet after 2.1B3 no longer automatically map the Return key to produce an "Enter," so you need to press the "Enter" button to send an Enter command to the host using a macro.)  The action classes and associated characters available in both ASCII and the "IBM Keymapping" modes are as follows:  
  20.  
  21.    Perform an emulator action:  (C) followed by a code:
  22.  
  23.       !CA   Set the ALT (mousedown state) modifier bit for all 
  24.             keypresses.  This allows you to have an Alternate macro 
  25.             set.
  26.       !Ca   Set ALT off.
  27.       !CC   Close the session without a dialog.
  28.       !CE   Show the .edit window.
  29.       !Ce   Show the terminal emulator window.
  30.       !CD   Show MacTCP smoothed round-trip time and time-out
  31.             in the upper right corner of the screen.
  32.       !Cd   Show MacTCP packets sent and received in the upper 
  33.             right corner of the screen.  This is the default.
  34.             The send counter becomes inverted when a resend
  35.             is performed.
  36.       !CF   Close the copyright/help textwindow.
  37.       !CH   Dont update the display.
  38.       !CL   Display all received characters as literals in ASCII 
  39.             emulators. 
  40.       !CM   Set the top bit (meta-bit) of the next ASCII character. 
  41.       !CR   Restore line 25.
  42.       !CS   Update the display as usual.
  43.       !CT   Turn on cursor positioning using the mouse.
  44.       !Ct   Turn off cursor positioning.
  45.       !CZ   Toggle fast drawing mode (useful for library data entry 
  46.             checking).
  47.  
  48.    Perform a formatted copy:  (c) followed by a code: 
  49.  
  50.       !cC   Clear the Clipboard.
  51.       !ca   Copy an RLIN library Name Authority record and convert
  52.             it into a NOTIS record; if the first line of the
  53.             selection does not contain the "ID:" field, it is 
  54.             assumed to be a continuation of a record and is 
  55.             appended to the portion of a record in the Clipboard.
  56.       !cA   As above, except this copy option allows supports
  57.             users who are privileged to do deletions on Name
  58.             Authority records under NOTIS.
  59.       !cb   Copy an RLIN Book record and convert it into a NOTIS
  60.             record, as described above.
  61.       !cB   As above, except this copy option allows supports
  62.             users who are privileged to do deletions on Book
  63.             records under NOTIS.
  64.  
  65.    Perform an editing action:  (E) followed by a code:
  66.  
  67.       !EA   Select the whole screen or text.
  68.       !EB   Append the selection to the session's .edit window.
  69.       !EC   Copy  the selection to the Clipboard.
  70.       !ES   Use the standard text mode for copying the selection.
  71.       !ET   Use the Table mode when copying the selection.
  72.       !EV   Paste the selection into the emulator  screen or the .edit
  73.             window.
  74.       !EW   Select the word where the emulator cursor is located 
  75.             (the default double-click action).
  76.       !EX   Cut the selection range (works only with the .edit window).
  77.  
  78.    Perform a file action:  (F) followed by a code:
  79.  
  80.       !FA   Append the selection to a file.
  81.       !FB   Append the selection to a file selected through a
  82.             Standard Put File dialog.
  83.       !FD   Print the emulator screen using Apple's no-longer- 
  84.             supported Streaming Text Print Manager routines.
  85.             May crash with some Printer Drivers (for example
  86.             the StyleWriter driver), but gives better alignment
  87.             of columns when using a laser printer.
  88.       !FF   Bring the Finder or application launchpad to the
  89.             front, closing sessions which are not configured
  90.             to stay open on Mandarin sleep events.
  91.       !Ff   Bring the Finder or application launchpad to the
  92.             front without closing any sessions.
  93.       !FP   Print the emulator screen using Apple's standard Print 
  94.             Manager routines.
  95.       !Fp   Print the .text window using Apple's standard Print Manager 
  96.             routines.
  97.       !FS   Save the selection in a file; if a file has not been 
  98.             opened, a Put File dialog will be performed.
  99.       !FT   Save the selection in a file; always present the Put File 
  100.             dialog.
  101.  
  102.    Move the cursor:  (M), and a code:
  103.  
  104.       !ML   Move the cursor to the left;
  105.       !MD   Move the cursor down;
  106.       !MU   Move the cursor up;
  107.       !MR   Move the cursor right.
  108.  
  109.    Query the user to enter a string:  (Q) followed by P, followed by the prompt, followed by a "!Q". macro command to terminate the prompt string.  The user's response will be sent out to the host.  To enter a password, use "!QS" to replace the characters with dots.  Both the query and the response must be under 256 characters.
  110.  
  111.         !QPEnter ID:!QQ
  112.  
  113.    To make a selection:  you must use four commands to set a selection range, each of which uses a number to specify the position on the screen numbered from 0; when all four codes have been received, the selection will be made.
  114.  
  115.       !S\000   selection start Y position, followed by the position 
  116.                number;
  117.       !T\000   selection start X position, followed by the position 
  118.                number; 
  119.       !U\023   selection end Y position, followed by the position 
  120.                number;
  121.       !V\079   selection end X position, followed by the position 
  122.                number.
  123.  
  124.       !S\000!T\000!U\002!V\079
  125.    
  126.    Record user input as macro commands (R) followed by a code:
  127.  
  128.       !RB   begin recording;
  129.       !RE   end recording and place the recoding in the scrap for
  130.             pasting into the .edit window or key macro dialog.
  131.  
  132.    Send a Telnet command or control MacTCP:  (t) followed by a letter:
  133.  
  134.       !tA   send Are You There;
  135.       !tB   send Telnet Break.
  136.       !tC   send Interrupt;
  137.       !tU   send Abort;
  138.       !tx   send Erase Character;
  139.       !tX   send Erase Line.
  140.       !ta   Type IP address at cursor.
  141.       !tD   Try to fix MacTCP's resend time-out.  This is the default.
  142.       !td   Don't try to fix MacTCP's resend time-out.
  143.  
  144.    Bring a window to the front (w) followed by the number associated with it in the Window menu:
  145.  
  146.       !w\001
  147.  
  148.    Perform a window action (W) followed by a code:
  149.  
  150.       !WSwindowname\000   Bring a window to the front; WS followed by the       
  151.             window name and terminated with another macro or null 
  152.             ASCII character.
  153.  
  154.    Move to X-coordinate:  (X) followed by a decimal number specifying the column number (0-255).
  155.  
  156.       !X\000
  157.  
  158.    Move to Y-coordinate:  (Y) followed by a decimal number specifying the row number (0-32).  The Y command always positions the cursor in column 0.
  159.  
  160.       !Y\000
  161.       !Y\002!X\049  position the cursor on 50th column of the 3rd line
  162.  
  163.    Delay:  (D) followed by the number of seconds to wait specified as \nnn, e.g. "!D\001".
  164.  
  165.    Loop:  (L) followed by the number of times to repeat the sequence of macro commands which follows; this sequence must be terminated by an entry containing "!L\000" (loop zero).  Using '\255' for the count will cause the loop to continue until the Command-. "cancel" key is pressed.
  166.  
  167.       !L\255echo hello!L\000
  168.    
  169.    Delay session macro processing until host output matches string:  (Z) followed by a number indicating the number of seconds to wait before aborting; if the number is '\255', it waits forever if the string is not matched.  This entry is followed by a list of characters to match, terminated by any non-character macro command (usually a Delay entry).  You might use this in a login as follows...  
  170.  
  171.       !Z\030login:!D\000myloginname!Z\030password:!D\000!QSEnter password:!QQ
  172.  
  173.