THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rodwelch@pacbell.net


S U M M A R Y


DIARY: January 24, 2003 08:58 AM Friday; Rod Welch

SDS new function to shift text that formats received documents.

1...Summary/Objective
2...Shift Text to Format Received Documents without Using Cut and Paste
3...Shift Text to New Left Margin - New Function and Menu Choice
4...028010 Shift Text to Cursor Uniform Left Margin
5...F1 F1 F7 Shift Text to Uniform Left Margin
6...000008 Macro 156 Profile Level 3 F1 F1 F8 Shift Text to Left Margin
7...F1 F1 F8 Shift Text to Uniform Left Margin
8...000008 Macro 156 Profile Level 3 F1 F1 F8 Shift Text to Left Margin
9...Editor Menu Add Shift Text to Tools
10...Tools Menu Add Shift Text to Editor
11...05040410 Editor Tools Menu Add Shift Text to New Left Margin
12...SDS Records Menu Add Shift Text to Tools
13...Tools Menu Add Shift Text to SDS Records
14...05040510 SDS Records Tools Menu Add Shift Text to New Left Margin


..............
Click here to comment!

CONTACTS 

SUBJECTS
F08 Shift Text to Cursor
Shift Text to Cursor Formatting Without Using Cut and Paste
Writing a Letter Correspondence Integrated with Contacts SDS Diary th
Receiving Documents Organizing Text to Desired Margins
Format Received Documents Quickly to Conform Flexible Structure Effec
Shift Text Lines to Desired Left Margin for Received Documents
Margins Shifting Text to Organize Received Information
Format Received Mail Takes Time Using Cut and Paste to Position Text
Format Received Text to Uniform Left Margin Difficult Gary Trying to
Align Left Margin Received Documents Difficult to Learn Using Cut and
Difficult to Learn Using Cut and Paste Shift Align Text into Uniform

2113 -
2113 -    ..
2114 - Summary/Objective
2115 -
211501 - Follow up ref SDS 6 0000, ref SDS 3 4O2F.
211502 -
211503 - Developed two new utilities to shift text without using cut and paste.
211504 - The first function F1 F1 F8 shifts all text to a uniform left margin;
211505 - the second function F1 F1 F7 shifts text that has a uniform left
211506 - margin to a different margin and maintains the existing structure.
211507 - These functions are available in the Editor and in SDS records using
211508 - the Tools menu. ref SDS 0 UJ3W
211509 -
211510 -     [On 030125 notified Gary of solving this problem. ref SDS 7 IW46
211512 -      ..
211513 -     [On 030316 Gary asked about procedures for using these new
211514 -     functions. ref SDS 8 VA4H
211515 -
211516 -
211518 -  ..
2116 -
2117 -
2118 - Usage
2119 -
211901 - Both of these functions work the same way....
211902 -
211903 -    1.  Place the cursor on the top line of a group of lines to be
211904 -        shifted, and on the column where the new left margin is needed.
211906 -         ..
211907 -    2.  Execute the function.
211909 -         ..
211910 -    3.  What happens....
211911 -
211912 -        The code will process all lines until two consecutive blank
211913 -        lines are encountered, and shift them as follows....
211914 -
211915 -        a.  F1 F1 F8, all lines will have a uniform left margin.
211916 -
211917 -            See below for more details on problem to be solved.
211918 -            ref SDS 0 TH3H
211920 -             ..
211921 -        b.  F1 F1 F7 all lines will be shifted and retain the existing
211922 -            format structure.
211923 -
211924 -
211925 -
211927 -  ..
2120 -
2121 -
2122 - Evaluation
2123 -
212301 - The new procedures save from 5 to 20 or so key strokes typically
212302 - needed to shift text into position.  The first function F1 F1 F8
212303 - positions text to a uniform left margin, solving the problem of an
212304 - irregualr left margin when the Microsoft cut and paste program is used
212305 - to place text from an Interent web site into an SDS record or a
212306 - document file, as related on 021027. ref SDS 1 K87F
212308 -  ..
212309 - The second function F1 F1 F8 has a more general editing function of
212310 - shifting a text structure left or right.  It differs from the first
212311 - function by making relative changes in the location lines, which
212312 - maintains any existing format structure; whereas, the first function
212313 - makes absolute changes needed to begin setting up a format.
212315 -  ..
212316 - The new procedures are much simpler to use than cut and paste, they
212317 - seem very fast, essentially they occur instantly. This saves time and
212318 - the burden of learning to use cut and paste, which is a challenge on
212319 - keyboards that lack ergonomic design for production work.
212320 -
212321 -
212322 -
212324 -  ..
2124 -
2125 -
2126 - Problem
2127 -
212701 - Shift Text to Format Received Documents without Using Cut and Paste
212702 -
212703 - On 021227 Gary commented on challenges of learning to receive
212704 - documents into the SDS doc log system. ref SDS 3 4O2F  One problem we
212705 - talked about on the telephone after getting his letter on 021227 is
212706 - that positioning text for received documents to a uniform left margin
212707 - takes time for complex documents, because creating the format requires
212708 - many uses of cut and paste, along with attention to detail, and some
212709 - interpretation about what the author intended, as related on 021027.
212710 - ref SDS 1 K87F  On 021214  On 030115 Gary commented on difficulty
212711 - learning to use cut and paste for shifting text to a common left
212712 - margin. ref SDS 4 YM7H  Earlier, on 021214 Gary reported working on
212713 - developing a utility to accomplish a uniform left margin, and
212714 - indicated this is not a trivial problem to solve. ref SDS 2 LY3M
212716 -      ..
212717 -     [On 030125 notified Gary of solving this problem. ref SDS 7 IW46
212719 -      ..
212720 -     [On 030316 Gary asked about procedures for using these new
212721 -     functions. ref SDS 8 VA4H
212723 -  ..
212724 - More recently, Gary's letter on 030119, ref SDS 5 346X, discussed
212725 - difficulties learning to use cut and paste to establish a uniform left
212726 - margin for received documents. ref SDS 4 YM9P
212728 -  ..
212729 - This occurs a lot when copying text from the Internet with Windows
212730 - technology.  The left margin will vary, and so needs to be set
212731 - uniformly to a location that fits the structure of the document.
212733 -  ..
212734 - Additionally, often email needs to be shifted left or right to create
212735 - outline structure, and or to obtain a uniform left margin.
212737 -  ..
212738 - All of these scenarios/use cases relate to enabing the user to set a
212739 - uniform left margin fast and easy.
212741 -  ..
212742 - Today, will try to create a new function that does this.
212743 -
212745 -  ..
2128 -
2129 -
2130 - Solution
2131 -
213101 - Shift Text to New Left Margin - New Function and Menu Choice
213102 -
213103 - Created this simple utility that works as follows....
213104 -
213105 -     1.  After using get command to read in text from an email or other
213106 -         document, per guidance on receiving correspondence in the
213107 -         record on 021027, ref SDS 1 KI4H, and/or after using cut and
213108 -         paste to read in text from another file, typically an Internet
213109 -         file in a browser, then, rather than use cut and paste, also,
213110 -         explained on 021027, ref SDS 1 K87F, instead....
213112 -          ..
213113 -     2.  Put the cursor on the top line of text to be positioned, and
213114 -         move it to the column for the left margin.
213116 -          ..
213117 -         Make sure the text to shift into position has at least two
213118 -         blank lines below it.
213120 -          ..
213121 -     3.  F1 F1 F8 executes the function, per below, ref SDS 0 MH5G, or
213122 -         open the Tools menu in either the Editor, per below,
213123 -         ref SDS 0 1H4F, or an SDS record, ref SDS 0 8O3O, and click
213124 -         on....
213125 -
213126 -                     Uniform Left Margin........F1 F1 F8
213127 -
213128 -         ...which is the 3rd option in the menu.
213130 -          ..
213131 -         All of the lines from the cursor to the next series of 2
213132 -         consecutive blank lines, will be shifted to a uniform left
213133 -         margin where the cursor was when the function was called.
213135 -          ..
213136 -         At this time, it does not shift outline structure, but shifts
213137 -         enmase all other structured text.
213139 -          ..
213140 -         It does not justify text to the changed margins.  For one
213141 -         thing, a lot of text from the Internet has long URL strings
213142 -         that crash the justify op, so will for now will do it a step
213143 -         at a time by first tackling the problem of getting a specified
213144 -         uniform left margin.
213145 -
213146 -
213147 -
213148 -
213150 -  ..
2132 -
2133 -
2134 - 1702
2135 -
213501 - 028010  Shift Text to Cursor Uniform Left Margin
213502 -
213503 - Line 20, ref OF 1 EW4I,
213504 -
213505 -    -goto sattlm
213506 -
213507 -        1st fucntion sets all text to a uniform left margins for all
213508 -        lines until two consecutive blank lines are encountered.  It is
213509 -        called by F1 F1 F8, and is used primarily to assemble text
213510 -        pasted into a file by the Microsoft program that creates an
213511 -        uneven left margin, most often when copying information from a
213512 -        web page on the Internet. ref SDS 0 FH4M
213513 -
213514 -
213515 -    -goto sstc
213516 -
213517 -        2nd fucntion shifts text that already positioned on a uniform
213518 -        left margin to a new left margin for all lines until two
213519 -        consecutive blank lines are encountered.  It is called by F1 F1
213520 -        F7, and is used for quickly changing the outline structure in a
213521 -        record.  It merely speeds up using cut and paste hopefully and
213522 -        is slighly easier to use, because it does not require using the
213523 -        cut and paste profile called by Shift F5. ref SDS 0 FH4M
213525 -     ..
213526 -     4.
213527 -     5.
213528 -    -label sstc
213529 -    setcnt 118 9927
213530 -    -goto ss4tc
213531 -
213532 -        Set a flag that the 2nd function is running and jump code that
213533 -        resets the flag so we can distinguish them. ref SDS 0 P231
213534 -
213536 -     ..
213537 -    -label sattlm
213538 -    setcnt 118 0
213539 -
213541 -     ..
213542 -    -label ss4tc
213543 -    -if @48 = 3 macro 152
213545 -        ..
213546 -       If macro file 02801 is called with a function key F1 F1 F8, per
213547 -       below, ref SDS 0 M15G, or with F1 F1 F7, also per below,
213548 -       ref SDS 0 MH5G, then reset primary profile.
213550 -  ..
213551 - Line 60, ref OF 1 L24M, -label sattlm
213552 -
213553 -    macro 6
213554 -    setcur 110 0
213555 -    addcnt 110 1
213556 -    errorcnt 0 0
213558 -        ..
213559 -       This operation actually starts be the user specifying where to
213560 -       move the left margin by placing the cursor on a desired column,
213561 -       per above. ref SDS 0 UI6Y  The code begins by saving this
213562 -       location to restore original position after processing.  Save
213563 -       cursor position column value to set uniform left margin, and
213564 -       increment the value because setcur identifies screen column 1 as
213565 -       "0".
213567 -  ..
213568 - Line 40, ref OF 1 F88K, -label lp1 in 02801
213569 -
213570 -    -label lp1
213571 -    loc_cur 0 1
213572 -    -if @47 = 2 loc_cur 0 10
213573 -    chrcnt 1 0
213574 -    -if @1 = 32 aw
213576 -        ..
213577 -       Do a loop that shifts every line to the start position of the
213578 -       cursor.  Start with cursor on column 1, and in SDS start on col
213579 -       10, because that is the first data entry line.  Chrcnt 1 0
213580 -       checks the default left margin to see if text to be processed
213581 -       starts on that column.  If the first position is a space, it
213582 -       means the text begins at another position, so do aw to advance
213583 -       to the start column of the text to be processed.
213584 -
213586 -  ..
213587 - Line 70, ref OF 1 QH5K, -label lp1 in 02801
213588 -
213589 -    setcur 112 0
213590 -    addcnt 112 1
213591 -
213592 -       Get cursor position for shifting text to new left margin that
213593 -       positions lines with same relative location in format structure.
213594 -       This is used for the second function, F1 F1 F7.
213595 -
213597 -  ..
213598 - Line 90, ref OF 1 XL6M, -label lpa1 in 02801 about 20 lines below
213599 -
213600 -    -label lpa1
213601 -    -if @118 = 9927 loc_cur 0 @112
213602 -
213603 -       If the flag is set for the 2nd function to shift text with an
213604 -       existing uniform left margin to a new left margin and maintain
213605 -       realative format postitioning, then move the cursor to the
213606 -       location of the initial location found, per above, ref SDS 0
213607 -       QI4G, and execute the split on all lines from the same column.
213609 -     ..
213610 -    split
213611 -    loc_cur 0 @110
213612 -    ic 45
213613 -    rel_cur 0 -1
213614 -    join
213615 -    macro 79
213617 -        ..
213618 -       This is the essence of the process.  With the cursor on the
213619 -       first char of text, split the text, move the cursor to new
213620 -       location for the left margin, saved in counter 110, per above,
213621 -       ref SDS 0 SM9I, and enter any char, in this case we use a dash,
213622 -       char 45, they join the original split in the prior step.  We
213623 -       now have something like....
213624 -
213625 -             - original text from original margin on new left margin
213627 -        ..
213628 -       Collapse the original text to the new left margin with macro 79.
213629 -       This line is now on the left margin specified by placing the
213630 -       cursor at the user's preference to start the op, per above.
213631 -       ref SDS 0 SM9I
213633 -  ..
213634 - Line 60, ref OF 1 W77J, -label lpup in 02801
213635 -
213636 -    setcnt 2 1
213637 -    -label lpup
213638 -     6.
213639 -    -if @0 > 0 -goto end7
213640 -    setlen 1 0
213641 -    -if @47 = 1 -if @1 = 0 -goto t2ndl
213642 -    -if @47 = 2 -if @1 = 8 -goto t2ndl
213643 -
213644 -    -if @118 = 9927 -goto lpa1
213645 -
213646 -       If this is the 2nd function, then the loop returns to a fixed
213647 -       location for splitting the existing text, per above. ref SDS 0
213648 -       XM6G
213649 -
213650 -    -goto lp1
213652 -        ..
213653 -       Do a simple loop to to process all consecutive lines, and
213654 -       paragraphs and stop after finding two conseutive blank lines,
213655 -       since a paragraph is identified by one blank line separating
213656 -       text.  In the editor, 47 = 1, the line length must be 0, and in
213657 -       SDS, 47 = 2, line length must be 8 to account for the line
213658 -       number field.
213659 -
213660 -
213661 -
213662 -
213663 -
2137 -

SUBJECTS
Shift Text to New Left Margin Without Using Cut and Paste Tools
F08 Shift Text to Cursor
F1 F1 F8 Move Text to Uniform Left Margin F1 F1 F8 Macro 02801

2405 -
240601 -  ..
240602 - F1 F1 F7 Shift Text to Uniform Left Margin
240603 - 000008  Macro 156 Profile Level 3 F1 F1 F8 Shift Text to Left Margin
240604 -
240605 - Line 730, ref OF 4 XI4K, -entry 156
240606 -
240607 -    pf8 @c:\sd\03\02801 #2
240609 -        ..
240610 -       Added call to the new macro file 02801 #2 to change the left
240611 -       margin for text that already has a uniform left margin, per
240612 -       above. ref SDS 0 UJ3W
240613 -
240614 -
240615 -
240616 -
2407 -

SUBJECTS
Shift Text to New Left Margin Without Using Cut and Paste Tools
F08 Shift Text to Cursor
F1 F1 F8 Move Text to Uniform Left Margin F1 F1 F8 Macro 02801

2705 -
270601 -  ..
270602 - F1 F1 F8 Shift Text to Uniform Left Margin
270603 - 000008  Macro 156 Profile Level 3 F1 F1 F8 Shift Text to Left Margin
270604 -
270605 - Line 730, ref OF 4 PK4J, -entry 156
270606 -
270607 -    pf8 @c:\sd\03\02801
270609 -        ..
270610 -       Added call to the new macro file 02801 to set left margin to
270611 -       uniform postition, per above. ref SDS 0 UJ3W
270612 -
270613 -
270614 -
270615 -
270616 -
270617 -
2707 -

SUBJECTS
Shift Text to New Left Margin Without Using Cut and Paste Tools

2903 -
290401 -  ..
290402 - Editor Menu Add Shift Text to Tools
290403 - Tools Menu Add Shift Text to Editor
290404 - 05040410  Editor Tools Menu Add Shift Text to New Left Margin
290405 -
290406 - Line 90, ref OF 2 SI4M, -label oxhrJ in 0504041
290407 -
290408 -    ins_text " Left Margin Uniform.........F1 F1 F8 "
290409 -    loc_cur 0 80
290410 -    ins_text " @C:\SD\03\02801  "
290411 -    rel_cur 1 -56
290413 -        ..
290414 -       This is the 3rd menu option in Tools, and is fairly convenient
290415 -       in the Editor, but a little less so in SDS, because the Tools
290416 -       menu is at the far right of the screen.
290418 -        ..
290419 -       Would prefer to put this function in the Edit menu, since it
290420 -       seems very much like editing, but we have run out of space in
290421 -       the Edit menu, and to increase would take another 2 - 4 hours
290422 -       work, and I need to work on other things.
290424 -        ..
290425 -       We need to come up with another scheme for the way menus work
290426 -       that does not use cut and paste.  I think some ideas are
290427 -       beginning to form on this, but will save that for another day.
290428 -
290429 -           [On 031022 did this. ref SDS 9 H36K
290430 -
290432 -  ..
290433 - Line 90, ref OF 2 TC5J, -label oxhrJ in 0504041
290434 -
290435 -    ins_text " Shift Text to New Margin....F1 F1 F7 "
290436 -    loc_cur 0 80
290437 -    ins_text " @C:\SD\03\02801 #2  "
290438 -    rel_cur 1 -56
290439 -
290440 -       Call the 2nd function to shift text and maintain relative format
290441 -       postion, per above. ref SDS 0 KW5J
290442 -
290443 -
290444 -
290445 -
290446 -
2905 -

SUBJECTS
Shift Text to New Left Margin Without Using Cut and Paste Tools
Planning Funcation Key Assignments SDS

3104 -
310501 -  ..
310502 - SDS Records Menu Add Shift Text to Tools
310503 - Tools Menu Add Shift Text to SDS Records
310504 - 05040510  SDS Records Tools Menu Add Shift Text to New Left Margin
310505 -
310506 - Line 230, ref OF 3 DT4N, -label oxhrJ in 05040510
310507 -
310508 -    Use same code scheme for Editor, per above. ref SDS 0 1H4F
310509 -
310510 -
310512 -  ..
310513 - Line 230, ref OF 3 6J5K, -label oxhrJ in 05040510
310514 -
310515 -    Use same code scheme for Editor, per above. ref SDS 0 TJ4N
310516 -
310517 -
310518 -
310519 -
310520 -
310521 -
310522 -
310523 -
3106 -