(Continues on from the "TextAttribs" script - requires you to follow the previous section first)

The following commands are used in this module:

What if you wanted to write your address on the right at the top, as in traditional letter writing (at least it's traditional in English, it may be different for other cultures but let's imagine it's valid in your region)?

So far, you may have noticed that everything came out to the left. You probably also noticed the Alignment controls in amongst the  Change Font settings.

Tutorial 2 - Module 8 - Preview / Script (1)Continuing on from your existing script ...

  • Insert a font change.
  • Choose Right from the Alignment section (leave colours and font as they are for now; if you have a rather large font size, insert a separate font change before this one to correct it).
  • Insert the phrase of your choice.
  • Insert EOL.

How does it look? Aligned as you expected, to the right of the page? Good.

Tutorial 2 - Module 8 - Preview / Script (2)Now something more tricky:

  • Insert a Left ALIGN command (using Change Font).
  • Insert a TEXT command using "Hello".
  • Insert a Centre ALIGN command.
  • Insert a TEXT command using "Again".
  • Insert a Right ALIGN command
  • Insert a TEXT command using "World".
  • Insert EOL.

Rendered how you expected? Nope. Did you do anything wrong? Nope. Is it because the text has no spaces, so it can't separate them? Nope (go ahead and do it with spaces, if you want to prove it).

It's because the ALIGN command has a restriction. Like the alignment buttons in a Microsoft Word document, it affects the whole line. Even though you can apparently insert an ALIGN command between each TEXT chunk, only the last one issued before EOL takes effect. Thus, because we issued a Right ALIGN command last, that's the way it aligns.

Technically it is possible to get multiple alignments on the same physical line, but that uses a different feature. The Alignment available in the Change Font section (the ALIGN script command) works exactly like Microsoft Word's alignment buttons, so try to remember that. You would normally simply issue one before each line of text you build up.

Note that the PARAGRAPH command introduced above also obeys line alignment - in this case the whole wrapped paragraph is aligned to the left, to the right, or centrally.

Now, please:

  • Click Save Script
  • Optionally click Close Script

Then when you are ready continue with module 9.