MacOS – How to easily type a template without copy paste

automatormacostext;

Several times a day I type the same URL (in text form) into website forms. I would like a simple script (or Automator action) that types the URL where I have a cursor placed.

Best Answer

You may find it easier to use text substitutions instead of using AppleScript or Automator.

Go to System Preferences > Keyboard > Text and, in the Replace and With columns, assigned the text you want to type and what it will be replaced with.

For example, type url1 to have it replaced with https://www.google.com as shown in the image below.

When you do type the Replace text, a small pop-up will show with the With text, press the Spacebar key to have the substitution take place, or the Esc key to cancel the action.

enter image description here