home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / text / textra / docs / textra.doc < prev    next >
Text File  |  1995-02-27  |  42KB  |  970 lines

  1.  
  2.    This document describes TEXTRA, a very user-friendly text editor.  So 
  3. user-friendly, I hope, that you could use it without reading a manual.  
  4. Good learning philosophy: play with it.  One of the easiest, that's the 
  5. goal.
  6.  
  7.    TEXTRA is SHAREWARE.  For $25.00, I will send you a personalized 
  8. executable that does not contain the 60-second startup-delay screens that 
  9. are in the otherwise-identical UN-registered version.
  10.  
  11.    The UN-registered version is freely-distributable.  However, please 
  12. insure that the unaltered 'doc' files & rexx scripts accompany the 
  13. executable if you do pass it around.
  14.  
  15.    If you are using TEXTRA to read this file, just Press F4 to view the 
  16. next page.  F5 to review the previous page.
  17.  
  18.    TEXTRA was written in JForth Professional, which I recommend highly.  As 
  19. far as I know, TEXTRA is enforcer-clean under WB 2.04.
  20.  
  21. 26-Apr-89 v1.01 executable size 60148
  22. 29-May-89 v1.02   "    "    "   60864
  23. 22-Jul-89 v1.03   "    "    "   61080
  24. 21-Oct-89 v1.04   "    "    "   65208
  25. 05-Jan-90 v1.05   "    "    "   69836
  26. 18-Feb-90 v1.06   "    "    "   69400
  27. 18-Apr-90 v1.07   "    "    "   70520
  28. 06-Jun-90 v1.08   "    "    "   71544
  29. 15-Dec-90 v1.09   "    "    "   79404
  30. 26-Aug-91 v1.10   "    "    "   98976 ARexx, horiz scroll bar, help kbd
  31. 23-Oct-91 v1.11   "    "    "  100500 WB2.0 graphics, fix GET CURSOR CHAR
  32. 16-Mar-92 v1.12   "    "    "  108920 Undo, SmartLaunch, 1st shareware
  33.   "   "     "     "    "    "  111280 -- v1.12 Freely-Distributable version
  34. 10-Jan-93 v1.13   "    "    "  127124 Fonts, Multi-Processing, lots more
  35. 07-Jan-93 v1.13   "    "    "  129252 -- v1.13 Freely-Distributable version
  36. 29-May-93 v1.14   "    "    "  135200 -- v1.14 Status Line, User-define kybd
  37.   "   "   v1.14   "    "    "  137260 -- v1.14 Freely-Distributable version
  38.  
  39. (see the 'WhatsNew.doc' file for better history/features information)
  40. ---------------------------------------------------------------------------
  41.  
  42.  
  43.               T A B L E     O F     C O N T E N T S
  44.              ---------------------------------------
  45.  
  46. NOTE: If you're using TEXTRA to read this Table Of Contents, a GREAT
  47.       way to find specific topics is to...
  48.       
  49.       1. Double-click on the section number ( for example, 9.4.8 )
  50.       2. "Find" it by using Right-Amiga-F (press RETURN in the requester)
  51.       3. If necessary, use Right-Amiga-N (Find Next) to locate the next
  52.          occurence of the same text (most likely a cross-reference).
  53.  
  54.  
  55. 1.  INSTALLING TEXTRA
  56.     1.1  The Textra Package
  57.          1.1.1 The Program and Icon
  58.          1.1.2 The ARexx Scripts
  59.          1.1.3 The Documentation
  60.     1.2  The Provided Installation Program
  61.          1.2.1 Installation of the program and icon
  62.          1.2.2 Installation of the Textra-ARexx Scripts
  63.          1.2.3 Installation of the Documentation
  64.          1.2.4 Final Verification before Installation
  65.     1.3  Manual Installation
  66.  
  67. 2.  INVOKING TEXTRA
  68.     2.1  General
  69.     2.2  Invoking from Workbench
  70.     2.3  Invoking from CLI or SHELL
  71.     2.4  TEXTRA as the Default Tool for "Project"-type icons
  72.     2.5  Launching more than once.
  73.     2.6  Automatic gadget imagery selection
  74.  
  75. 3.  THE TEXTRA CURSOR
  76.     3.1  Cursor appearance
  77.     3.2  Positioning the cursor with the mouse
  78.     3.3  Positioning the cursor with the keyboard arrow keys
  79.     3.4  Quickly finding the cursor (function key F3)
  80.  
  81. 4.  ENTERING TEXT INTO THE DOCUMENT
  82.     4.1  Inserting text at the cursor location
  83.     4.2  The RETURN key
  84.          4.2.1  The "Auto-Indent" mode
  85.     4.3  The BACKSPACE key
  86.          4.3.1  The "Auto-BackSpace" mode
  87.     4.4  The DEL key
  88.     4.5  The TAB key
  89.     4.6  The control-key filter and defeat feature (Function key F2)
  90.     4.7  The HELP key
  91.  
  92. 5.  SELECTING A RANGE OF TEXT
  93.     5.1  Using the mouse to select a range of characters
  94.     5.2  Selecting text by double and triple clicking
  95.     5.3  Operations on selected ranges
  96.     5.4  Selecting more than the visible screen
  97.     5.5  Extending a select range by SHIFT-clicking
  98.     5.6  Identifying balanced parenthesis or brackets
  99.  
  100. 6.  VIEWING PAGES
  101.     6.1  The vertical scroll arrow gadgets
  102.     6.2  The vertical scroll thumb gadget
  103.     6.3  Scrolling the page with the keyboard arrow keys
  104.     6.4  Keys that PAGE-up or PAGE-down
  105.     6.5  The horizontal scroll gadget
  106.  
  107. 7.  TEXTRA WINDOWS
  108.     7.1  Limitations
  109.     7.2  The title bar
  110.          7.2.1 The optional Status Line
  111.     7.3  The close gadget
  112.     7.4  The sizing gadget
  113.     7.5  The Window-Size-Toggle feature (Function key F1)
  114.     7.6  The 'Previous Window' feature (Function key F6)
  115.     7.7  The Window's font
  116.  
  117. 8.  THE TEXTRA AREXX INTERFACE  ("TREXXTRA" -- hoo boy!)
  118.     8.1  General AREXX Information
  119.     8.2  Executing TEXTRA/AREXX Scripts or Commands
  120.     8.3  Running scripts in the background
  121.     8.4  Writing Your Own TEXTRA/AREXX scripts
  122.     8.5  The TEXTRA "Tutorial" ARexx script
  123.     8.6  Aborting TEXTRA-ARexx Scripts
  124.     8.7  User-definable keyboard via the CTRL key
  125.  
  126. 9.  TEXTRA MENUS
  127.     9.1  Accessing the menus
  128.     9.2  The "Project" menu
  129.          9.2.1  Open A File...
  130.          9.2.2  Open By Name...
  131.          9.2.3  New File
  132.          9.2.4  Insert File...
  133.          9.2.5  Revert To Saved
  134.          9.2.6  Save File
  135.          9.2.7  Save File As...
  136.          9.2.8  Save All Files
  137.          9.2.9  Close File
  138.          9.2.10 Print File
  139.          9.2.11 Print Selected Lines
  140.          9.2.12 Printing Preferences...
  141.          9.2.13 About TEXTRA...
  142.          9.2.14 Quit
  143.     9.3  The "Windows" menu
  144.          9.3.1  Dynamically-changing items
  145.          9.3.2  Additional information
  146.     9.4  The "Edit" menu
  147.          9.4.1  Undo
  148.          9.4.2  Cut
  149.          9.4.3  Copy
  150.          9.4.4  Paste
  151.          9.4.5  Find
  152.                 9.4.5.1  String...
  153.                          9.4.5.1.1 Wrap-around search option
  154.                 9.4.5.2  Next Occurence
  155.          9.4.6  Replace
  156.                 9.4.6.1  String...
  157.                 9.4.6.2  Next Occurence
  158.                 9.4.6.3  Then Find
  159.          9.4.7  Case
  160.                 9.4.7.1  lower
  161.                 9.4.7.2  UPPER
  162.                 9.4.7.3  Capitalize
  163.          9.4.8  Go to Line...
  164.          9.4.9  Editing Preferences...
  165.     9.5  The "Utilities" menu
  166.          9.5.1  File Protections...
  167.          9.5.2  Help on Keyboard...
  168.          9.5.3  ARexx...
  169.          9.5.4  Set Window Font...
  170.          9.5.5  Font Preferences...
  171.          
  172. 10.  TEXTRA GENERAL INFORMATION
  173.     10.1  TEXTRA's use of Path and File names
  174.     10.2  TEXTRA String Gadget Shortcuts
  175.     10.3  TEXTRA String Gadgets and the RETURN key
  176.     10.4  TEXTRA Requesters
  177.     10.5  TEXTRA Preferences File
  178.     10.6  TEXTRA behavior when reading in files
  179.          10.6.1  Converting CR,LF sequences to Amiga End-Of-Lines.
  180.          10.6.2  Checks file type when reading in a file.
  181.     10.7  TEXTRA behavior when writing files to disk
  182.          10.7.1  Stripping extra Blank Lines.
  183.     10.8  TEXTRA Keyboard Summary
  184.  
  185. ---------------------------------------------------------------------------
  186.  
  187.  
  188. 1. INSTALLING TEXTRA
  189.  
  190. 1.1 TEXTRA may be run without any installation at all.  The 
  191. installation procedure simply copies the program and a set of support 
  192. files (none required) to your hard disk.
  193.  
  194. 1.1.1 The program and icon file are supplied at the root of the 
  195. installation package.  They may be used to view any and all 
  196. documentation.  All supplied text files default tool fields point to 
  197. this TEXTRA.
  198.  
  199. 1.1.2 The TEXTRA package includes a variety of macro files, executable 
  200. under its powerful ARexx interface.  General page/paragraph-formatting 
  201. macros, useful utilities, and scripts that allow TEXTRA to act as an 
  202. integrated editing environment for JForth Professional and HSPascal 
  203. are provided.
  204.  
  205. 1.1.3 The accompanying documentation, of which this is a part of, is 
  206. detailed and complete.  It includes separate files covering Textra as 
  207. editing environment, its ARexx interface and command set, detailed 
  208. version history, and list of known gotchas.
  209.  
  210. 1.2 The package provides an installation program with icon that will 
  211. prompt the user through the installation process.  When the installer 
  212. prompts for a destination location for anything, it will create the 
  213. specified directory, if it doesn't already exist.
  214.  
  215. 1.2.1 The user is asked for the location for the program and icon.
  216.  
  217. 1.2.2 If ARexx is running on the system, it will automatically copy 
  218. the ARexx scripts in the REXX: directory, if assigned.  (If REXX: is 
  219. not assigned, the user is prompted to specify their location.)
  220.   If Arexx does not seem to be running at all on the system, then the 
  221. user is give the option of installing the scripts.
  222.  
  223. 1.2.3 The user is asked if he/she wishes the Documentation files to be 
  224. copied, and prompted for a location if so.
  225.  
  226. 1.2.4 Finally, all choices are listed, ending with a prompt to either 
  227. continue, retry or exit the installer.  
  228.  
  229. 1.3 If desired, the package can be installed from CLI with the
  230. following commands (assuming the Textra package is on a floppy in df0:)...
  231.  
  232.    copy df0:Textra#? "<wherever-you-want-program+icon>"
  233.    
  234. If you want the docs...
  235.  
  236.    copy df0:docs/#? "<wherever-you-want-the-docs>"
  237.  
  238. If you want the ARexx macro files...
  239.  
  240.    copy df0:scripts/#?.textra rexx:
  241.  
  242. If you want the JForth-oriented ARexx macros...
  243.  
  244.    copy df0:scripts/JForth_Scripts/#?.textra rexx:
  245.  
  246. If you want the C-oriented ARexx macros...
  247.  
  248.    copy df0:scripts/C_Scripts/#?.textra rexx:
  249.  
  250. If you want the HSPascal-oriented ARexx macros...
  251.  
  252.    copy df0:scripts/HSPascal_Scripts/#?.textra rexx:
  253.  
  254.  
  255. ---------------------------------------------------------------------------
  256.  
  257.  
  258. 2. INVOKING TEXTRA
  259.  
  260. 2.1 TEXTRA may be launched in all of the various ways the Amiga
  261. permits.
  262.  
  263. 2.2 TEXTRA may double-clicked from Workbench (probably the most
  264. common means of starting it).  Workbench Extended-Selection mode
  265. is implemented to provide opening a specific set of document icons.
  266. For information about this mode, refer to your Workbench manual.
  267.  
  268. 2.3 "TEXTRA" may be typed into the CLI or SHELL, with as many
  269. optional filenames as the AmigaDOS command line will allow.
  270. For example...
  271.  
  272.     1> RUN TEXTRA <filename1> <filename2> ... <filenameX>
  273.  
  274. 2.4 A "Project" icon that has TEXTRA specified in its "Default Tool"
  275. field will invoke TEXTRA, when double-clicked, and be opened in its
  276. own window.
  277.  
  278. 2.5 TEXTRA will not launch twice.  If a TEXTRA B is launched and finds
  279. TEXTRA A already running, B will send to A the names of the files that
  280. B was passed via the mechanisms described above in sections 2.2, 2.3
  281. or 2.4.  TEXTRA B will the exit.  This feature allows users to "get
  282. that file open" in the absolute most convienient method possible.  (Note
  283. that enough memory must be available for TEXTRA B and TEXTRA A to
  284. momentarily reside in the machine.)
  285.  
  286. 2.6 At startup, TEXTRA checks the relative average color intensities 
  287. of the active intuition screen and if same as wb 2.0+, (color1 
  288. darkest, color0 medium, color2 brightest), it will use shaded gadgets 
  289. and 2.0-style checkbox imagery (even if under 1.3 and earlier).
  290.  
  291.    If the colors are not found suitable for shadowing, TEXTRA will 
  292. render it's requester and gadget imagery primarily in monochrome 
  293. (colors 0 and 1).  Boolean gadgets (checkboxes) are also rendered 
  294. differently.
  295.  
  296. ---------------------------------------------------------------------------
  297.  
  298.  
  299. 3. THE TEXTRA CURSOR
  300.  
  301. 3.1 The current cursor location (where text will be inserted) is
  302. represented by a thin line, of a different color than either text
  303. or background.  The cursor marks the place where newly-typed
  304. characters will be inserted (characters following will 'shift right').
  305.  
  306. 3.2 The cursor may be positioned by simply single-clicking the LEFT MOUSE
  307. BUTTON on the text where you want thecursor to be.
  308.  
  309. 3.3 The cursor may also be moved with the "arrow" keys on the keyboard.
  310. A SHIFT-left-arrow or SHIFT-right-arrow will move the cursor to the
  311. beginning or end of the current line, respectively.
  312.  
  313. 3.4 If the cursor or select range is not on the visible part of the
  314. screen, it can be located and displayed via the F3 key.
  315.  
  316. ---------------------------------------------------------------------------
  317.  
  318.  
  319. 4. ENTERING TEXT INTO THE DOCUMENT
  320.  
  321. 4.1 As keys are typed at the keyboard, they are entered in the file
  322. at the current cursor location, and the cursor is advanced by one.
  323.  
  324. 4.2 The RETURN key inserts a new line, and moves the cursor there.
  325.  
  326. 4.2.1 If the Auto-Indent mode is enabled (see section 9.4.9), the
  327. cursor will align with the line above when the RETURN key is pressed.
  328.  
  329. 4.3 The BACKSPACE deletes the character to the immediate left of the
  330. cursor and backs the cursor up one column.  If the cursor is at the
  331. leftmost column, the line is joined with the previous one.
  332.  
  333. 4.3.1 When the cursor rests on the 1st non-blank character of a line, 
  334. the Auto-BackSpace mode (section 9.4.9) comes into play, if enabled.  
  335. The BACKSPACE key will"back-up" the line text by whatever it takes to 
  336. line up with the beginning of the text on the line above.  If the 
  337. previous line does not start to the left of the cursor position, the 
  338. alignment is made to the next line above that does.
  339.  
  340. 4.4 The DELETE key removes the character to the immediate right of the
  341. cursor.  If the cursor is at the end of a line, the next line is joined with
  342. the cursor line.
  343.  
  344. 4.5 The TAB key advances the cursor to the next column that is an
  345. even multiple of the TAB width value (section 9.4.9).
  346.  
  347. 4.6 Normally, TEXTRA will not allow control characters into the
  348. window, permitting only visible or white-space characters.  This
  349. feature can be temporarily defeated, for 1 character, by pressing F2.
  350. Following F2, the next character will be accepted into the window
  351. unfiltered.
  352.  
  353. 4.7 The HELP key will display an informational requestor, displaying
  354. information about the keyboard-activated functions.
  355.  
  356. ---------------------------------------------------------------------------
  357.  
  358.  
  359. 5. SELECTING A RANGE OF TEXT
  360.  
  361. 5.1 It is possible to mark a series of characters for the next
  362. operation by "dragging" with the mouse.  Just press and hold the
  363. left mouse button, then drag to the desired selection end-point.
  364.  
  365. 5.2 A series of characters will become selected when the
  366. LEFT MOUSE BUTTON is double-clicked while the mouse cursor is
  367. positioned over them.  Based on the setting of the EDITING PREFERENCES
  368. (section xx), the series will consist of either contiguous 
  369. non-white-space or aplha-numeric characters.  If the LEFT MOUSE BUTTON
  370. is triple-clicked, that entire line will become selected.
  371.  
  372. 5.3 When a range of text is selected, a subsequent operation will
  373. affect the entire selected area.  For example, if a key is typed while
  374. a range is selected, the range will be cut from the file, replaced by
  375. that key.  Other examples are the BACKSPACE and DEL keys, which both
  376. act to simply delete any selected area.  Certain items under the EDIT
  377. menu, described later, also operate on any current range.
  378.  
  379. 5.4 If, while selecting text, the mouse is moved near the bottom or top
  380. of the window, available text in the appropriate direction will scroll
  381. into view, becoming selected in the process.  Therefore, a select range
  382. can extend past the visible limits of the window.
  383.  
  384. 5.5 A select range may be established or size changed by holding
  385. down the SHIFT key when clicking in the window.  If the click occurs
  386. outside the current select range, the range is extended to there.
  387. If inside, the end-point of the select range is adjusted to the
  388. click-point.
  389.  
  390. 5.6 If you double click on any of these characters... ( ) < > [ ] { }
  391. Textra will search through the file in the appropriate direction for a 
  392. "balanced match" (handles nested substrings).  This is great for 
  393. example, when programming C and you want to see everything that the { 
  394. you're staring at encompasses.  Textra will highlight everything 
  395. forward to the balancing } character.
  396.  
  397. Note that you can also find corresponding double-quote characters 
  398. "like around this", but TEXTRA assumes you are clicking on the LEADING 
  399. double-quote.  (In other words, it will only conduct a forward search 
  400. for a corresponding double-quote).
  401.  
  402.  
  403. ---------------------------------------------------------------------------
  404.  
  405.  
  406. 6. VIEWING PAGES
  407.  
  408. 6.1 The easiest method for moving through the file is to use the vertical
  409. scroll bar on the right side of the window.  Clicks of the left
  410. mouse button on the arrows at either end move the document vertically
  411. in continuous scroll fashion.
  412.  
  413. 6.2 The "thumb" in the middle of the scroll bar not only indicates the
  414. visible-page-area relative to the total-file-size (by it's height),
  415. but also the position within the file (by its vertical positioning).
  416. It can also be "selected" with the left mouse button and moved as
  417. a "coarse adjust".  The area immediately above and below the "thumb"
  418. may be clicked with the left button as a "page-scroll" mechanism.
  419.  
  420. 6.3 Another method by which text may be scrolled into view is by moving
  421. the cursor...attempts to move the cursor "off the window"
  422. will cause text in that direction to scroll.
  423.  
  424. 6.4 Function keys F4 and F5 will PAGE the display down and up,
  425. respectively.  The Shift-UP/DOWN-arrow-key combinations will also PAGE
  426. the display in the appropriate direction AND position the cursor
  427. to the middle of the new page.
  428.  
  429. 6.5 The horizontal scroll gadget works similarly to the vertical
  430. scroll gadget.  It becomes functional when a line is being displayed
  431. that exceeds the current width of the window.  When typing, the display
  432. will auto-scroll to center the cursor when it reaches a window edge.
  433.  
  434. ---------------------------------------------------------------------------
  435.  
  436.  
  437. 7. TEXTRA WINDOWS
  438.  
  439. 7.1 TEXTRA allows any number of windows, limited by the amount of 
  440. memory in your computer (most limiting is possibly the amount of 
  441. available CHIP ram, at least in early amigas).  Textra lines can be up 
  442. to 255 characters long, number of lines limited by your total 
  443. available memory (entire file is kept in ram, FAST is grabbed first).
  444.  
  445. 7.2 The title of each TEXTRA window is set to the full-pathname
  446. of the file that was read in (or created).  This is also the name
  447. of the file that will be written during a SAVE operation (unless
  448. the "SAVE AS..." menu option is chosen, section 9.2.7).  If the
  449. file has been modified since last saved, the filename will be
  450. preceeded by a '*'.
  451.  
  452. 7.2.1 A Status Line may optionally be presented immediately below the 
  453. title bar.  It displays the current cursor location or select range in 
  454. column, line coordinates (zero-based).
  455.  
  456. 7.3 Each window includes a standard Intuition close gadget, which
  457. performs the same action as the "CLOSE FILE" menu option.  See the
  458. discussion on "CLOSE FILE" (section 9.2.9) for more information.
  459.  
  460. 7.4 The "sizing" gadget in the lower-right hand corner of each window
  461. may be used to adjust the dimensions of that window, up to the
  462. full-screen limitations of the Workbench.
  463.  
  464. 7.5 Function key F1 may be used as a "window-size-toggle" between
  465. default size (when F1 was first hit) and that size specified in the
  466. "Edit Preferences..." requester (9.4.9).  This preference setting
  467. defaults to full-screen.
  468.  
  469. 7.6 Function key F6 will re-select the previously-selected window.
  470. This a handy "toggle between 2 windows" mode, facilitating convienient
  471. evolutions such as successive Cut, Copy & Paste sequences (sections 9.4.2,
  472. 9.4.3 and 9.4.5).
  473.  
  474. 7.7 If the asl.library is available (usually means WB2.0 or later), 
  475. the font in which a window is initially rendered is configurable via 
  476. the "Font Preferences..." requester (9.5.5).  A windows font may be 
  477. changed at any time via the "Set WIndow Font..." asl requester 
  478. (9.5.4).
  479.  
  480. ---------------------------------------------------------------------------
  481.  
  482.  
  483. 8. THE TEXTRA-AREXX INTERFACE
  484.  
  485. 8.1 When TEXTRA starts up and finds AREXX available, it opens a 
  486. message port called "TEXTRA".  This port listens for AREXX messages 
  487. from other programs, and allows you to control the editor both from 
  488. other applications or from AREXX "scripts", many of which are supplied 
  489. with TEXTRA (they should be copied to your 'rexx:' directory).  These 
  490. scripts may contain a mixture of AREXX and TEXTRA commands; they allow 
  491. access to many internal TEXTRA editing functions which may be 
  492. performed on the 'current' window.
  493.    After opening the "TEXTRA" message port, it searches to see if
  494. a script called "Startup.textra" is available, and if so, executed.
  495. No such script is supplied with the package, the feature is available
  496. soley for user customization.
  497.    The AREXX menu item is dimmed if AREXX is not available when TEXTRA 
  498. is launched.
  499.  
  500. 8.2 TEXTRA/AREXX scripts or commands may be executed via the 
  501. "AREXX..." item in the Utilities menu (section 9.5).
  502.    The ARexx requester will be presented.  It contains ten string 
  503. gadgets, 8 with an accompanying button describing the function key to 
  504. execute the gadgets contents without having to bring up the requester.  
  505. The remaining 2 gadgets are executed by clicking in them, (if 
  506. necessary) changing their contents, and pressing ENTER (the other 8 
  507. may also be executed in this way).
  508.    Some string gadgets will assume default strings when initially 
  509. installed.  Gadget contents are executed or saved as separate, 
  510. independant operations and if executed, the ARexx requester will close 
  511. before any ARexx commands are carried out.  The string gadget contents 
  512. are saved in "S:TEXTRA.CMDS" which is only as large as the length of 
  513. the strings plus an EOL character for each.  The CANCEL button allows 
  514. the requester to be closed and reverted to it's original state upon 
  515. opening.
  516.    Into any string gadget, you can enter the name of a Textra-ARexx 
  517. script that exists in the rexx: directory (followed by any required 
  518. arguments), as in...
  519.  
  520.         slide 8
  521.  
  522.    Optionally, you can directly enter ARexx and Textra commandsinto
  523. the string gadgets, but they should be preceeded with an '@' char-
  524. acter.  Examples...
  525.  
  526.         @notify "Hello world!"
  527.         @prefs autoindent on
  528.         @options results; get file name; notify result
  529.  
  530. 8.3 Normally, while a script is executing, another window may be made 
  531. frontmost and edited.  (It should be noted that some system global 
  532. resources, such as the cut, copy & paste buffer, are shared between 
  533. the script and the edited window.  While none of the supplied
  534. scripts use the CUT, COPY or PASTE commands, it is worth keeping in
  535. mind if you write your own.)
  536.  
  537. 8.4 Please refer to the accompanying file "RexxCommand.doc" for a
  538. description of the TEXTRA/AREXX command set as well as general
  539. information about writing your own scripts.
  540.  
  541. 8.5 Using section 8.2 as a guide, execute the "Tutorial" ARexx script
  542. for an interactive 'training session' for beginners.  In one of the
  543. ARexx requester string gadgets, simply enter:
  544.  
  545.         tutorial
  546.  
  547. 8.6 While an ARexx script is executing, the 'ARexx...' menu text 
  548. changes to "Cancel ARexx Script".  This feature tries to tell the 
  549. running script that the user wishes it to terminate, but will only 
  550. have an effect if the running script uses the CHECKCANCEL Textra-ARexx 
  551. command.  (All appropriate supplied scripts utilize the CHECKCANCEL 
  552. command).
  553.  
  554. 8.7 By default, CTRL+any alphabetic key will execute an ARexx script 
  555. named after the key.  For example:  CTRL-A will look for and execute a 
  556. script called CTRLA.textra.  CTRL+HELP will try to run 
  557. CTRLhelp.textra.  EVERY ALPHABETIC KEY ON THE KEYBOARD IS THEREFORE 
  558. USER-DEFINABLE.
  559.    No CTRL scripts have been supplied with the package; this feature
  560. is provided soley for user customization.
  561.  
  562.  
  563. ---------------------------------------------------------------------------
  564.  
  565.  
  566. 9. TEXTRA MENUS
  567.  
  568. 9.1 Four menus are available and present themselves when the RIGHT
  569. MENU BUTTON is depressed and held.  Some menu items may also
  570. be activated by simultaneously pressing the RIGHT AMIGA key
  571. and the one that is specified in the menu item text.  When the HELP
  572. key is pressed (section 4.7), a list of such menu "key equivalents" 
  573. presents itself.
  574.  
  575. 9.2 The "Project" Menu
  576.  
  577. 9.2.1 OPEN FILE... opens a new window with a full file-selector
  578. requester and buttons that allow quick access to the top 8 disk
  579. devices (like DF0:).  The PARENT button changes the current directory
  580. to the level above the one being displayed.  The KEYBOARD button
  581. presents the user with a string requester into which a file or
  582. directory specification may be typed.  The CANCEL button exits the
  583. requester with no other action while the OK button enters the file
  584. or directory selected in the list box (the same as CANCEL if nothing
  585. is selected).  Double-clicking one of the names performs the same
  586. action as the OK button.
  587.  
  588. 9.2.2 OPEN BY NAME... opens a new window, then presents a string
  589. requester for specifying the filename from the keyboard, bypassing
  590. the directory scan for the list of names (which can take time on
  591. large directories, especially on floppy drives).  The current 
  592. directory of the requester is that of the spawning window.  If a 
  593. pathname is typed into this requester, the "OPEN FILE" selector 
  594. requester is opened, presenting a list of the files in that directory.
  595.  
  596. 9.2.3 OPEN NEW FILE opens a window without specifying a filename; the
  597. default name "Untitled" is assigned, at the directory level of
  598. the spawning window.  (No actual disk file will be written until
  599. the SAVE AS... function is invoked.)
  600.  
  601. 9.2.4 INSERT FILE... presents the TEXTRA file-requester allowing
  602. selection of a file to INSERT at the current cursor location (as
  603. though the entire file were typed in).  Any select range will be
  604. deleted prior to the insertion.
  605.  
  606. 9.2.5 REVERT TO SAVED causes the read-in version of the selected
  607. file to be discarded, replaced by the version that was last-saved
  608. to disk.  A verification requester is presented to make sure this
  609. is not done accidently.
  610.  
  611. 9.2.6 SAVE FILE causes the currently-selected file to be written to
  612. disk, if modified.  If the file has not been changed (no '*' before
  613. the title), this menu item is disabled.
  614.  
  615. 9.2.7 SAVE FILE AS... allows saving the currently selected file under 
  616. a different name.  After this operation, the title bar will contain 
  617. the new name, and it will have been created on disk.  If the specified 
  618. file already exists, the user is warned and given a chance to abort.  
  619. If a directory name is entered (or no name at all), the SAVE AS... 
  620. file requester is presented.  This requester is very similar in 
  621. operation to the "OPEN FILE..." requester; all buttons work the same, 
  622. except the OK button will overwrite the selected file (as does 
  623. double-clicking a filename).
  624.  
  625. 9.2.8 SAVE ALL FILES causes all files that have been modified and not
  626. saved to be written to disk.  If there are no modified files, this
  627. menu item is disabled.
  628.  
  629. 9.2.9 CLOSE FILE will check if the file has been modified but not
  630. saved and warn the user if so.  Note that closing TEXTRA's last window
  631. will cause it to exit; a requester will notify you if you are closing
  632. the last window and give you the chance to abort.  After the window
  633. has closed, TEXTRA will select and front another TEXTRA window if any
  634. remain.  Right-Amiga-W is a keyboard menu-equivalent for the CLOSE
  635. FILE menu item.
  636.  
  637.  
  638. 9.2.10 PRINT FILE prints (to the printer.device) the currently selected
  639. window using the current preference settings (section 9.2.12).  While
  640. a print job is in progress, other windows may be edited or have ARexx
  641. scripts executed in them, but not printed.  Print jobs may be cancelled
  642. at any time by using the CANCEL button on the "Printing in progress..."
  643. requester.  (Any delay experienced is the amount of time it takes your
  644. printer to respond to the RESET command).  If the window to be printed
  645. is the only one open, TEXTRA will ask if you want to open another.
  646.  
  647. 9.2.11 PRINT SELECTED LINES prints any and all lines, in their 
  648. entirity, if any part of it is currently selected.  The current 
  649. preference settings (section 9.2.12) are observed.  The same 'print 
  650. job' behavior described in section 9.2.10 applies.
  651.  
  652. 9.2.12 PRINTING PREFERENCES... presents a dialog to allow the user to
  653. enable/disable the following print job behavior...
  654.  
  655.   1). Print a one-line page header at the top of each page noting the 
  656.       date, filename and page number.
  657.   2). Print sequential line numbers at the beginning of each line.
  658.   3). Skip over perforated page boundries of fanfold paper.
  659.   4). Eject the page (form-feed) after printing an entire file (9.2.10)
  660.   5). Eject the page (form-feed) after printing selected lines (9.2.11)
  661.  
  662. Note that TEXTRA also observes the system 'Preferences' settings for 
  663. left & right margin, characters-per-line, and lines-per-page (use your 
  664. system 'Preferences' tool to set these).  The USE button causes the 
  665. currently displayed settings to go into effect.  The USE+SAVE button 
  666. does the USE function, and also saves the current settings in the 
  667. Textra Preferences file (section 10.5).  The CANCEL button causes any 
  668. currently displayed settings that have been changed to be discarded.  
  669. If the PRINT PREFERENCES requester is active, this menu item is 
  670. disabled from other windows.
  671.  
  672. 9.2.13 ABOUT TEXTRA provides the author's address and describes
  673. distribution information.  Also, if the TEXTRA is registered, the name
  674. and address of the honest person who has earned my thanks and respect
  675. is displayed in this requester.
  676.  
  677. 9.2.14 QUIT will exit TEXTRA, closing all files in the process.  All
  678. files that have been modified but not saved will issue a notification
  679. requester, providing the opportunity to save at that time.  Right-
  680. Amiga-Q is the keyboard menu-equivalent for the QUIT menu item.
  681.  
  682. 9.3 The "Windows" Menu
  683.  
  684. 9.3.1 One item exists in the "WINDOWS" menu for each open file, the
  685. menu item text being the same as the title bar for the associated
  686. window.  Selecting an item makes it the current window, if not
  687. already.
  688.  
  689. 9.3.2 Additionally, the text includes the "*" character before the
  690. filename if the file has been modified since last written to disk.
  691. A checkmark preceeds the item representing the current file.
  692.  
  693. 9.4 The "Edit" Menu
  694.  
  695. 9.4.1 UNDO reverts all changes since the last time the cursor was
  696. positioned by clicking the mouse or by using the cursor arrow keys.
  697.  
  698. 9.4.2 CUT removes the selected range of characters from the 
  699. currently-selected file, but saves them in the TEXTRA clip area
  700. (TEXTRA does not interface with the standard Amiga Clipboard
  701. Device...future versions may do so).  The previous contents of
  702. the TEXTRA clip area are lost.  If there is no select range,
  703. this menu item is disabled.
  704.  
  705. 9.4.3 COPY moves the selected range of characters of the 
  706. currently-selected file to the TEXTRA clip area, but does not
  707. remove them from the file.  The previous contents of the TEXTRA
  708. clip area are lost.  If there is no select range, this menu
  709. item is disabled.
  710.  
  711. 9.4.4 PASTE inserts whatever is in the TEXTRA clip area into the
  712. currently-selected file, at the current cursor location.  If a select
  713. range is active in this file, it is deleted before the insertion takes
  714. place.  There is no effect on the contents of the TEXTRA clip area.
  715. It nothing has been placed into the TEXTRA clip area (via CUT or COPY),
  716. this menu item is disabled.
  717.  
  718. 9.4.5 FIND presents a sub-menu with 2 choices:
  719.  
  720. 9.4.5.1 STRING... presents a requester prompting for the string
  721. to search for, ignoring character case.  The string gadget will, as
  722. a default, contain the previous string searched for (empty if none).
  723. However, if a range of characters is selected that is ALL ON ONE
  724. LINE, it will supercede any previously-searched-for string as the
  725. default for the string gadget.  The search begins just past the
  726. current cursor location or selected range of characters.
  727.  
  728. 9.4.5.1.1 WRAP... On the FIND STRING requester is a checkbox that
  729. allows you to enable "wrap-around" search.  Normally, if the search
  730. string is not found, TEXTRA terminates the search at the end of the
  731. document.  With the "wrap" box checked, the search will continue from
  732. line 1, and end when either the text is found, or the starting line
  733. is reached.  This mode also applies to the "FIND NEXT OCCURENCE" menu
  734. item (section 9.4.5.2).
  735.  
  736. 9.4.5.2 NEXT OCCURENCE conducts another case-insensitive search for 
  737. the same text string that had previously been searched for.  If no 
  738. search had yet been conducted the "STRING..." requester is presented.
  739.  
  740. 9.4.6 REPLACE presents a sub-menu with 2 choices:
  741.  
  742. 9.4.6.1 STRING... presents a double-string-requester, prompting for
  743. both the string to conduct a case-insensitive search for and a
  744. string to replace the it with.  The RETURN key will
  745. toggle the selected string gadget.  The user may optionally:
  746.  
  747.   1). replace all instances of the found string (with the "ALL" 
  748.       button)
  749.  
  750.   2). replace just the next one found (via the "ONCE" button)
  751.  
  752.   3). abort (via "CANCEL").
  753.  
  754. The search begins just past the current cursor location
  755. or selected range of characters.
  756.  
  757. 9.4.6.2 NEXT OCCURENCE conducts another "REPLACE" operation, using the
  758. same strings that were used last time.  If none exist, the "STRING..."
  759. requester is presented.
  760.  
  761. 9.4.6.3 THEN FIND allows the user to decide which instances of
  762. the specific text will be REPLACEd, and which will not.  This feature
  763. is usually used thusly:
  764.  
  765.   1). Bring up the REPLACE STRING Requester (via menu or 
  766.       Right-Amiga-R).
  767.   
  768.   2). Enter the appropriate strings in the 2 string gadgets.
  769.   
  770.   3). Click on the SEARCH button.  The first instance of the "Search 
  771.       for:" text will be located and highlighted (text must occur 
  772.       AFTER the cursor in the file, so if you want the entire file 
  773.       checked, put the cursor at the beginning of the document).
  774.   
  775.   4). If you want to REPLACE the highlighted text, press 
  776.       Right-Amiga-Y.  If not, Right-Amiga-N.  (like Yes and No)
  777.   
  778.   5). The editor will respond accordingly and locate the next instance 
  779.       of the text.
  780.  
  781. 9.4.7 CASE presents a sub-menu with 3 choices:
  782.  
  783. 9.4.7.1 LOWER exhibits 2 behaviors depending on whether an area
  784. is selected or not.  If there is, the entire selected area is converted
  785. to lower case.  If not, the next word after the cursor is searched for
  786. and converted to lower case if found. 
  787.  
  788. 9.4.7.2 UPPER exhibits 2 behaviors depending on whether an area
  789. is selected or not.  If there is, the entire selected area is converted
  790. to upper case.  If not, the next word after the cursor is searched for
  791. and converted to upper case if found. 
  792.  
  793. 9.4.7.3 CAPITALIZE exhibits 2 behaviors depending on whether an area
  794. is selected or not.  If there is, each word in the selected area is
  795. located and capitalized.  If not, the next word after the cursor is
  796. located and capitalized. 
  797.  
  798. 9.4.8 GO TO LINE... presents a string requester prompting for the
  799. desired line number, with the initial string gadget contents being
  800. equal to the current cursor line (or the beginning of any selected
  801. range).  First line of file is considered line 1.
  802.  
  803. 9.4.9 EDITING PREFERENCES... presents a requester allowing configuration
  804. of:
  805.  
  806.   1). "Auto-Indent" mode (section 4.2.1)
  807.   
  808.   2). "Auto-BackSpace" mode (section 4.3.1)
  809.   
  810.   3). TAB WIDTH value (section 4.5)
  811.   
  812.   4). "Convert CR,LF to LF on OPEN" mode (section 10.6)
  813.   
  814.   5). "Strip Extra Blank Lines on SAVE" mode (section 10.7.1)
  815.   
  816.   6). AlphaNumeric OR Non-Whitespace double-click highlighting
  817.       (section 5.2)
  818.  
  819.   7). Operation of the F1 Window Size Toggle function key.
  820.       (section xx).
  821.  
  822.    The USE button causes the currently displayed settings to go into effect.
  823. The USE+SAVE button performs the USE function, and also saves the current
  824. settings in the Textra Preferences file (section 10.5).  The CANCEL button
  825. causes any currently displayed settings (that have been changed), to be
  826. discarded.  If the EDITING PREFERENCES requester is active, this menu item
  827. is disabled from other windows.  (Right-Amiga-E is a keyboard equivalent
  828. for this menu item.)
  829.  
  830. 9.5  The "Utilities" Menu
  831.  
  832. 9.5.1  FILE PROTECTIONS... provides the ability to set the 6 relevant
  833. file protection bits that are stored and processed by AmigaDOS.  These
  834. include Deletable, Executable, Writable, Readable, Archived and Script
  835. (particularly handy when writing AmigaDOS scripts).  The SAVE button
  836. causes the currently displayed settings to become active.  The CANCEL
  837. button is self-explanatory.
  838.  
  839. 9.5.2  HELP ON KEYBOARD... performs the same action as the HELP key
  840. (section 4.7).
  841.  
  842. 9.5.3  AREXX... presents a requester affording access to the Textra-
  843. ARexx Interface.  See section 8 for more information.
  844.  
  845. 9.5.4  SET WINDOW FONT... allow the user to change or find the name of
  846. the currently selected window's font.  This function requires the asl.library.
  847. The selection is completely independant of the selected font used for
  848. Newly-Opened Windows (9.5.5).
  849.  
  850. 9.5.5  FONT PREFERENCES... presents those aspects of the font display facility
  851. which provide save-able configuration parameters.  This version (v1.13) only
  852. has one; the selection of which font will be used for all subsequent newly-
  853. opened windows.  The consistant USE, USE+SAVE, CANCEL interface of the other
  854. TEXTRA preferences dialog is preserved.
  855.  
  856.  
  857. ---------------------------------------------------------------------------
  858.  
  859.  
  860. 10. TEXTRA GENERAL INFORMATION
  861.  
  862. 10.1 TEXTRA always fully expands a specified file or directory name
  863. and uses that form to again find the file, if necessary.  For example,
  864. you may have typed in "DF1:MyFile" as the filename, but the window
  865. title will substitute the name of the volume, possibly "MyDisk:MyFile".
  866. This is almost always desirable, because if TEXTRA saved "DF1:", you
  867. might unknowingly save it to the wrong disk, just because you switched
  868. the disk in that drive.  TEXTRA will ask you specifically for the same
  869. name.
  870.    The only situation you should be aware of is WHEN YOU HAVE TWO
  871. DISKS OF THE SAME NAME in your system.  In this case, AmigaDOS can
  872. sometimes choose the wrong disk when TEXTRA passes the full-pathname
  873. to it.
  874.   In the above example, we could save it to the wrong disk if the disk
  875. in DF0: is also named "MyDisk:" (a backup, perhaps???).  This is not
  876. caused by TEXTRA, but can happen anytime in AmigaDOS that you use the
  877. full-pathname to specify a file.
  878.  
  879. 10.2 Intuition provides two String Gadget shortcuts that can be
  880. useful to the TEXTRA user.  TEXTRA string gadgets that provide
  881. a default text string when they appear will revert back to this
  882. string whenever "Right Amiga-Q" is pressed.  The "Right Amiga-X"
  883. combination will clear any displayed string.
  884.  
  885. 10.3 For most string gadgets, the RETURN key will perform the same
  886. action  as the "OK" button.  One exception is the
  887. "REPLACE" double-string requester, where the RETURN key toggles
  888. between the two string gadgets.
  889.  
  890. 10.4 TEXTRA Requesters are attached to (drawn in) the window that they
  891. have been spawned from.  The advantage is that multiple requesters
  892. are possible...you can select and work in another file even if
  893. the previous window is waiting for you to answer a question.  Every
  894. window can, in fact, have one or more open requesters.
  895.   Note that a TEXTRA window will automatically increase in size
  896. to accomodate a given requester, and will return to it's original
  897. position/size when the requester is closed.
  898.  
  899. 10.5 TEXTRA maintains certain user-settable parameters in the file
  900. "devs:Textra.prefs".  If your system disk is of the floppy variety,
  901. you may therefore be asked to insert this disk if you elect to save it.
  902. Normally, TEXTRA looks for this file only once, at startup.
  903.  
  904. 10.6 TEXTRA performs certain operations when reading in a file
  905. from disk...
  906.  
  907. 10.6.1 Whenever TEXTRA reads in a file (as a result of an OPEN or
  908. REVERT operation, for example), any CR,LF (Carraige Return, Line Feed)
  909. combinations will be automatically converted to the standard Amiga
  910. End-of-Line representation (Line Feed alone) IF the "Convert CR,LF to
  911. LF on OPEN" item is checked in the "Editing Preferences" (section 9.4.9).
  912.  
  913. 10.6.2 Whenever TEXTRA reads in a file, it examines the first 32 characters
  914. in an effort to evaluate the file's "text-ness".  If TEXTRA thinks
  915. it may not be a text file, it will give you the opportunity to abort and
  916. read in another file.
  917.  
  918. 10.7 TEXTRA performs certain operations when writing a file
  919. to disk...
  920.  
  921. 10.7.1 If the "Strip Extra Blank Lines on SAVE" option is checked
  922. in the EDITING PREFERENCES requester (section 9.4.9), TEXTRA will
  923. insure that the version on disk will not contain any blank lines at the
  924. end.  Note that if this feature is used, the SAVE (section 9.2.6) and
  925. SAVE AS... (section 9.2.7) operations will take a little longer.
  926.  
  927. 10.8 Keyboard Summary:
  928.  
  929.     F1 - Window Size Toggle (7.4)
  930.     F2 - Keyboard Filter Defeat (4.6)
  931.     F3 - Page to Cursor or Beginning of Select Range (3.4)
  932.     F4 - Display next page (6.4)
  933.     F5 - Display previous page (6.4)
  934.     F6 - Present previous file (7.6)
  935.     F7 - AREXX string (9.5.3)
  936.     F8 -   "      "      "
  937.     F9 -   "      "      "
  938.     F10-   "      "      "
  939.  
  940.     Help - Displays this information (Keyboard Summary)
  941.     
  942.     Shift-Left-arrow  - Cursor to beginning of current line (3.2)
  943.     Shift-Right-arrow - Cursor to end of current line (3.2)
  944.     Shift-Up-arrow    - Display previous page, cursor to middle (6.4)
  945.     Shift-Down-arrow  - Display next page, cursor to middle (6.4)
  946.  
  947.     Right-Amiga-O - Open existing file via file requester (9.2.1)
  948.     Right-Amiga-P - Open existing file by typing its name (9.2.2)
  949.     Right-Amiga-[ - Open a new file (9.2.3)
  950.     Right-Amiga-S - Save the current file (9.2.6)
  951.     Right-Amiga-W - Closes the current window (9.2.9)
  952.     Right-Amiga-Q - Quits Textra (
  953.     Right-Amiga-X - Cut selected text, save in clip area (9.4.2)
  954.     Right-Amiga-C - Copy selected text into clip area (9.4.3)
  955.     Right-Amiga-V - Paste clip area into file (9.4.4)
  956.     Right-Amiga-F - Find string in any case (9.4.5.1)
  957.     Right-Amiga-N - Find the next occurance of same string (9.4.5.2)
  958.     Right-Amiga-R - Replace string with another (9.4.6.1)
  959.     Right-Amiga-T - Find & replace same string again (9.4.6.2)
  960.     Right-Amiga-L - Set text or next word to lower case (9.4.7.1)
  961.     Right-Amiga-U - Set text or next word to upper case (9.4.7.2)
  962.     Right-Amiga-K - Capitalize words or next word (9.4.7.3)
  963.     Right-Amiga-G - Go to a specific line (9.4.8)
  964.     Right-Amiga-E - Display the Editing Preferences requester (9.4.9)
  965.     
  966.     Requester control...
  967.     
  968.     Right-Amiga-X - Clear text in string requester (10.2)
  969.     Right-Amiga-Q - Restore original string requester text (10.2)
  970.