Cursor at the beginning of a line

Is there a macro action that will sense when the cursor is at the beginning of a line? I want to set up a macro that will down arrow (from its current location at the end of the first line) until the cursor reaches the beginning of a line, and then execute another macro.

Here is one of the blocks of text I want to format:

Section 1
103:15-16
3:22-24
78:28
12:31
133:9-10
566:1-9
254:31

I have a macro that changes the font size of “Section 1”, but I need one that moves down to the line below “254:31”–and the number of items in each section varies.

David

If you KNOW that you are at the end of a line (paragraph actually), then a simple Type Keystroke of [RIGHT ARROW] will work.

But rather than rely on being at the end of a paragraph, I always make sure by using [OPT] [DOWN ARROW]. You could then follow this with [RIGHT ARROW].

Note that there is a difference between "line" commands and "paragraph" commands.
"Line" commands position the cursor at the beginning or end of a line as it is currently word-wrapped.
"Paragraph" commands position the cursor at the beginning or end of the paragraph, and defined by [RETURN} or [END OF LINE] characters.

Generally the only thing you can sense about the text is whether there is a selection.

You may be able to do what you want like this:

  • Repeat
    • Down Arrow
    • Command-Left Arrow
    • Command-Shift-Right Arrow
    • Maybe Pause
  • Until menu item Copy is not enabled

This will work with some apps, not with others.

Hey David,

Unless the app you're working in is very scriptable the only way would be:

  1. Manually select the entire block of text.
  • Copy it.
  • Calculate the number of paragraphs.
  • E (if it works in your app) or
  • Change Style.
  • (count of paragraphs - 1)
  • Change Style.

Clunky – but faster than doing it manually.

-Chris