Keyboard Maestro로 각 줄 맨 앞에 줄번호 넣기

By | 2021-01-19

Keyboard Maestro로 각 줄의 맨 앞에 1씩 증가하는 일련번호를 넣는 매크로.

원래 문장

사과
딸기

수박
오렌지

매크로 적용 후

1.사과
2.딸기
3.배
4.수박
5.오렌지

  1. 매크로 이름을 지정한다. (예: 줄번호 넣기)
  2. 트리커 핫키를 적당히 지정한다.(예: opt + cmd + L)
  3. Action목록에서 Variables → Prompt for User Input 선택
  4. Title: 시작줄번호 Prompt: 시작할 줄번호를 입력해주세요. Variables and Default Values에 LineNumber1 지정
  5. Action목록에서 Variables → Prompt for User Input에서 마지막 줄 번호를 지정한다.
  6. Title: 마지막 줄번호 Prompt: 줄번호를 몇번까지 넣을까요?Variables and Default Values에 LineNumberEnd10 지정
  7. Interface Control → Type a Keystroke 에서 cmd + Left Arrow
  8. Text → Insert Text by Typing에 %LineNumber%와 점(.)
  9. Interface Control → Type a Keystroke 에서 cmd + Down Arrow
  10. Variables → Set Variable to Calculation 선택. Set variable에 LineNumber, to에 LineNumber + 1
  11. 위 7번부터 10번까지를 선택한 후 톱니바퀴 아이콘을 눌러 Engroup→Repeat 선택.
  12. Excute there actions에 LineNumberEnd 입력.
[Keyboard Maestro에서 줄번호 추가]