Changes between Version 3 and Version 4 of Documentation/ARexxAPI/MAILWRITE


Ignore:
Timestamp:
Feb 5, 2014, 10:39:13 AM (11 months ago)
Author:
damato
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/ARexxAPI/MAILWRITE

    v3 v4  
    1 [[TranslatedPages]]\\
    2 [[TOC(titleindex, heading=ARexx API, notitle, depth=2, Documentation/ARexx API/*)]]
    3 
     1[[TranslatedPages]]
     2[[TOC(sectionindex, heading=ARexx Function List, notitle, depth=1, Documentation/ARexxAPI/)]]
    43== MAILWRITE
    54
    6 '''NAME'''
     5 NAME::
    76     MailWrite -- Open a new Write window or activate one already opened. (V1.3)
    87
    9 '''TEMPLATE'''
     8 TEMPLATE::
    109     VAR/K,STEM/K,WINDOW/N,QUIET/S
    1110
    12 '''FUNCTION'''
     11 FUNCTION::
    1312     Opens a Write window to compose a new mail or activates one already
    1413     opened.
     
    1817     any part of a new message.
    1918
    20 '''INPUTS'''
    21      VAR/K      - alternative variable to put the results into instead of RESULT  (V2.0)\\
    22      STEM/K     - base name used for the stem where the returned data will be stored  (V2.0)\\
    23      WINDOW/N   - change the command behavior to just activate an already opened Write window, may be 0 or 1 (or 2, to refer to an invisible Write window)\\
    24      QUIET/S    - force the window to stay invisible  (V2.1)\\
     19 INPUTS::
     20     `VAR/K`      - alternative variable to put the results into instead of RESULT  (V2.0)\\
     21     `STEM/K`     - base name used for the stem where the returned data will be stored  (V2.0)\\
     22     `WINDOW/N`   - change the command behavior to just activate an already opened Write window identified by the supplied parameter\\
     23     `QUIET/S`    - force the window to stay invisible  (V2.1)\\
    2524
    26 '''RETURNS'''
    27      VAR          - info returned by the command\\
    28      <STEM>WINDOW - number of the created/activated window, may be 0 or 1 (or 2, if QUIET is enabled)\\
     25 RETURNS::
     26     `VAR`          - info returned by the command\\
     27     `<STEM>WINDOW` - number of the created/activated window\\
    2928
    30      RC is set to 5 if WINDOW is used with a value referring to an
     29     `RC` is set to 5 if `WINDOW` is used with a value referring to an
    3130     inexistant window, or to 10 if the window cannot be opened, maybe
    3231     because the limit of two Write windows has been reached.
    3332
    34 '''NOTES'''
     33 NOTES::
    3534     Window slots are dinamically assigned as they are required until
    3635     all of them are occupied, and remain in use until the relevant window
    3736     is closed (an "invisible" Write window is also "open" within this
    38      context).  The optional WINDOW parameter sets the '''active''' Write window,
    39      upon which the [[ARexx API/WRITEATTACH| WRITEATTACH ]], [[ARexx API/WRITEBCC| WRITEBCC ]],
    40      [[ARexx API/WRITECC| WRITECC ]], [[ARexx API/WRITEEDITOR| WRITEEDITOR ]]
    41      [[ARexx API/WRITEFROM| WRITEFROM ]], [[ARexx API/WRITELETTER| WRITELETTER ]],
    42      [[ARexx API/WRITEMAILTO| WRITEMAILTO ]], [[ARexx API/WRITEOPTIONS| WRITEOPTIONS ]],
    43      [[ARexx API/WRITEQUEUE| WRITEQUEUE ]], [[ARexx API/WRITEREPLYTO| WRITEREPLYTO ]],
    44      [[ARexx API/WRITESEND| WRITESEND ]], [[ARexx API/WRITESUBJECT| WRITESUBJECT]], and
    45      [[ARexx API/WRITETO| WRITETO ]] commands will act when called, though strictly speaking
     37     context).  The optional `WINDOW` parameter sets the '''active''' Write window,
     38     upon which the [[WRITEATTACH]], [[WRITEBCC]],
     39     [[WRITECC]], [[WRITEEDITOR]]
     40     [[WRITEFROM]], [[WRITELETTER]],
     41     [[WRITEMAILTO]], [[WRITEOPTIONS]],
     42     [[WRITEQUEUE]], [[WRITEREPLYTO]],
     43     [[WRITESEND]], [[WRITESUBJECT], and
     44     [[WRITETO]] commands will act when called, though strictly speaking
    4645     this is only necessary when at least two Write windows are opened
    47      at the same time - in that case, "MAILWRITE WINDOW x" should be
     46     at the same time - in that case, `MAILWRITE WINDOW x` should be
    4847     called before using any of these commands to ensure they act on
    4948     the window they are supposed to.
     
    5352     commands.
    5453
    55 '''EXAMPLE'''
    56          /* Enable result codes */
     54 EXAMPLE::
     55     {{{#!urbiscript
     56     /* Enable result codes */
     57     OPTIONS RESULTS
    5758
    58          OPTIONS RESULTS
     59     /* Start a new mail */
     60     MAILWRITE STEM st.
     61     win1 = st.window
    5962
    60          /* Start a new mail */
     63     /* Start yet another mail */
     64     MAILWRITE STEM st.
     65     win2 = st.window
    6166
    62          MAILWRITE STEM st.\\
    63          win1 = st.window\\
     67     /* Edit the first Write window */
     68     MAILWRITE WINDOW win1
     69     WRITETO boss@example.com
     70     'WRITESUBJECT "I don't think I can go to work today"'
     71     WRITELETTER 'work:excuses.txt'
    6472
    65          /* Start yet another mail */
     73     /* Edit the second Write window */
     74     MAILWRITE WINDOW win2
     75     WRITETO peggy@example.org
     76     'WRITESUBJECT "Stuffed at work, I'll be late"'
    6677
    67          MAILWRITE STEM st.\\
    68          win2 = st.window\\
     78     /* Put the first email in the Outgoing queue */
     79     MAILWRITE WINDOW win1
     80     WRITEQUEUE
    6981
    70          /* Edit the first Write window */
     82     /* Start a new email using an invisible Write window */
     83     MAILWRITE STEM st. QUIET
     84     win3 = st.window
     85     WRITETO sales@example.com
     86     'WRITESUBJECT "Two with Mozzarella + lots of coke"'
     87     WRITELETTER 'dh5:priv/Snail_Linda.txt'
    7188
    72          MAILWRITE WINDOW win1\\
    73          WRITETO boss@example.com\\
    74          'WRITESUBJECT "I don't think I can go to work today"'\\
    75          WRITELETTER 'work:excuses.txt'\\
     89     /* Finish editing the second email and send it at once */
     90     MAILWRITE WINDOW win2
     91     WRITESEND
    7692
    77          /* Edit the second Write window */
     93     /* Send the third email */
     94     MAILWRITE WINDOW win3
     95     WRITEOPTIONS DELETE   /* avoid leaving any traces */
     96     WRITESEND
     97     }}}
    7898
    79          MAILWRITE WINDOW win2\\
    80          WRITETO peggy@example.org\\
    81          'WRITESUBJECT "Stuffed at work, I'll be late"'\\
     99 BUGS::
     100     `MAILWRITE` would throw Enforcer hits if YAM was iconified and the
     101     external editor was configured to be launched immediately, or when
     102     the `QUIET` switch was used; this was fixed in V2.3.
    82103
    83          /* Put the first email in the Outgoing queue */
    84 
    85          MAILWRITE WINDOW win1\\
    86          WRITEQUEUE\\
    87 
    88          /* Start a new email using an invisible Write window */
    89 
    90          MAILWRITE STEM st. QUIET\\
    91          win3 = st.window\\
    92          WRITETO sales@example.com\\
    93          'WRITESUBJECT "Two with Mozzarella + lots of coke"'\\
    94          WRITELETTER 'dh5:priv/Snail_Linda.txt'\\
    95 
    96          /* Finish editing the second email and send it at once */
    97 
    98          MAILWRITE WINDOW win2\\
    99          WRITESEND\\
    100 
    101          /* Send the third email */
    102 
    103          MAILWRITE WINDOW win3\\
    104          WRITEOPTIONS DELETE   /* avoid leaving any traces */\\
    105          WRITESEND\\
    106 
    107 '''BUGS'''
    108      MAILWRITE would throw Enforcer hits if YAM was iconified and the
    109      external editor was configured to be launched immediately, or when
    110      the QUIET switch was used; this was fixed in V2.3.
    111 
    112 '''SEE ALSO'''
     104 SEE ALSO::