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