Appending Text

As previously introduced, there are two methods of appending text with the copytext command. These are as follows:

append
The append option adds text to the end of the last line of the existing text in the destination area.
appendline
The appendline option adds text to the destination area but adds it on a new line.

To demonstrate the append and the appendline options, please do the following:

  1. Change the code for the pushbutton and the related function. The new code will be as follows:
    pushbutton([TOOLBAR], "Append",{ "process":append_test});
    			function append_test(){
    copytext({"fromtext":"z_copyfrom","totext":"z_copyto", "append":true});
    enter();
    }
  2. Type some text in the z-copyto textbox on the Easy Access screen.
  3. Type some text in the z_copyfrom textbox on the Easy Access screen.
  4. Click the pushbutton to intiiate the operation.

    The screen should now appear as follows:



  5. Now change the code of the function as follows:
    pushbutton([TOOLBAR], "Append",{ "process":append_test});
    			function append_test(){
    copytext({"fromtext":"z_copyfrom","totext":"z_copyto", "appendline":true});
    enter();
    }
  6. Type some new text in the z_copyfrom textbox on the Easy Access screen. Do not change the content of the z_copyto textbox.
  7. Click the pushbutton to initiate the operation.

    The screen should now appear as follows: