KM macro to paste a mailing address into an online form?

I am looking for a way to take a mailing address copied in a standard plain-text format, and paste it into online forms.

Address format would be similar to:

John Smith
123 Main St.
Anytown, OH 12345

The online forms would be the standard ones, broken up into separate fields for name, street address, city, sate, ZIP.

I want to be able to highlight the address text block, and then through a series of keyboard commands (or any suggested ideal method) be able to quickly paste the relevant info into the appropriate fields.

I am currently demoing KM, but if it can do this, it alone will be worth the license and I will purchase immediately.

There is an old thread discussing this exact situation, but they inconveniently discussed the solution via email.

Parsing addresses is difficult, but assuming your addresses are all in exactly that form, then you can use a Search Clipboard action like this:

Regex: “\A(.*)[\r\n]+(.*)[\r\n]+(.*), *(\w+) *(\d+)

After running that macro, you can use an Insert Text by Pasting action to paste %Variable%Street% to paste thre street address. I would make a set of macros all with the same hot key, Say ⌘⌥⌃⇧-A (using a Hyper Key on the Caps Lock key), and have them named appropriated:

00)Parse Address
01)Name
02)Street
03)City
03)State
03)Zip

the first one does the parsing, and the rest do the pasting, so you would do:

Copy (address), ⌘⌥⌃⇧-A, P (Parse - which could include the Copy step) then ⌘⌥⌃⇧-A,N to paste the Name, ⌘⌥⌃⇧-A, C to paste the City, etc.

1 Like