Best way to select State in address forms based on current clipboard

To do this with one state, say, if the clipboard has 1 of 2 values, “New York” or “NY” and I want to select the State Field from a websites dropdown menu, I can have KM press “n” on my keyboard 6 times.

But what is the most effective way to do it where it could be capable of working with any & every state?

Hey Dave,

Most menus on macOS support type-select, so you could very likely use a Insert Text by Typing action.


That does work for values of “New York”, but not “NY”,“ND”, etc…

Would 50+ if/or/then statements be the only way?

Could there be a database .csv/txt/xml file that could be used to retrieve the corresponding value, "New York"and then do the Insert Text by Typing?

If it were me, I'd have a list of states with both full name and abbreviation.
Then use JavaScript to search the list for the name on the clipboard, and then search the web field to find either the name or the abbrev.

If you can provide an example URL, I'll take a look at it when I have time.

There are lots of ways to do this.

Assuming you wanted to map from NY to New York (and all the others), you could do something like:

Thanks for the help everyone! I have this working.

That's great! Would you mind posting your final solution so others can benefit?