Changes between Initial Version and Version 1 of Documentation/ARexxAPI/WRITEEDITOR


Ignore:
Timestamp:
Sep 23, 2013 9:38:53 PM (12 months ago)
Author:
AmigaPhil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/ARexxAPI/WRITEEDITOR

    v1 v1  
     1== WRITEEDITOR 
     2 
     3'''NAME''' 
     4     WriteEditor -- Pass an ARexx command to the internal editor. (V2.0) 
     5 
     6'''TEMPLATE''' 
     7     VAR/K,STEM/K,COMMAND/A 
     8 
     9'''FUNCTION''' 
     10     Passes an ARexx command to the internal editor to act upon the 
     11     contents of a given Write window. 
     12 
     13     Quoting the TextEditor.mcc class autodoc, the following commands 
     14     are currently supported: 
     15 
     16      CLEAR\\ 
     17      CUT\\ 
     18      COPY\\ 
     19      PASTE\\ 
     20      ERASE\\ 
     21      GOTOLINE       Template: /N/A\\ 
     22      GOTOCOLUMN     Template: /N/A\\ 
     23      CURSOR         Template: Up/S,Down/S,Left/S,Right/S\\ 
     24      LINE           Template: /N/A\\ 
     25      COLUMN         Template: /N/A\\ 
     26      NEXT           Template: Word/S,Sentence/S,Paragraph/S,Page/S\\ 
     27      PREVIOUS       Template: Word/S,Sentence/S,Paragraph/S,Page/S\\ 
     28      POSITION       Template: SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S\\ 
     29      SETBOOKMARK    Template: /N/A\\ 
     30      GOTOBOOKMARK   Template: /N/A\\ 
     31      TEXT           Template: /F\\ 
     32      UNDO\\ 
     33      REDO\\ 
     34      GETLINE\\ 
     35      GETCURSOR      Template: Line/S,Column/S\\ 
     36      MARK           Template: On/S,Off/S\\ 
     37      DELETE\\ 
     38      BACKSPACE\\ 
     39      KILLLINE\\ 
     40      TOUPPER\\ 
     41      TOLOWER\\ 
     42 
     43     Refer to the Amiga User Interface Style Guide for more info 
     44     about these commands. 
     45 
     46     Please note that because of the internal use of the ReadArgs() function, 
     47     the ARexx Host requires to escape certain special characters like a newline 
     48     (0x0a) or escape character (0x1b) if you want to pass it i.e. with an 
     49     TEXT command to the texteditor. 
     50 
     51     This means that you have to use the following escape sequences in your 
     52     provided strings: 
     53 
     54     *N substitutes to 0x0a\\ 
     55     *E substitutes to 0x1b\\ 
     56     !** substitutes to *\\ 
     57     *" substitutes to "\\ 
     58 
     59     Please have a look at the examples below for a short example on how to use 
     60     these escape sequences properly. 
     61 
     62'''INPUTS''' 
     63     VAR/K       - alternative variable to put the results into instead of RESULT\\ 
     64     STEM/K      - base name used for the stem where the result will be stored\\ 
     65     COMMAND/A   - the command string to be passed\\ 
     66 
     67'''RETURNS''' 
     68     VAR          - info returned by the query\\ 
     69     <STEM>RESULT - results of the command, if any\\ 
     70 
     71     RC is set to 10 if no Write window was previously specified as 
     72     "active" with [[rx_mailwrite| MAILWRITE ]]. 
     73 
     74'''NOTES''' 
     75 
     76'''EXAMPLE''' 
     77         /* Enable result codes */ 
     78 
     79         OPTIONS RESULTS 
     80 
     81         /* Start a new mail */ 
     82 
     83         MAILWRITE STEM st.\\ 
     84         win = st.window\\ 
     85 
     86         /* Edit the Write window */ 
     87 
     88         MAILWRITE WINDOW win\\ 
     89         WRITETO boss@example.com\\ 
     90         'WRITESUBJECT "I don't think I can go to work today"'\\ 
     91 
     92         /* Clear the editor */ 
     93 
     94         WRITEEDITOR CLEAR 
     95 
     96         /* Write some text into the editor */ 
     97 
     98         'WRITEEDITOR "TEXT Sorry, but I am sick today!"' 
     99 
     100         /* Write some text containing a newline (*N) */ 
     101 
     102         'WRITEEDITOR "TEXT Hello Joe,*N I would like to meet you."' 
     103 
     104'''BUGS''' 
     105 
     106'''SEE ALSO''' 
     107     [[rx_mailwrite| MAILWRITE ]]