I am trying to do a new macro but really don’t know where or how to start.
I have a list of about 200 companies and their stock symbol. I would like to create a table/array/list? and be able to search by name and have it return the symbol.
Name,Symbol
Apple Inc,APPL;
Microsoft,MSFT;
Alphabet Inc,GOOGL;
Amazon,AMZN;
Roger
macOS Monterey Version 12.1 Keyboard Maestro version 10.02
Here is what I come up with after a lot of searching. The first action is just for testing and I have only loaded 4 business. Any suggestions or improvements? Also any ideal what will happen to response when I add 200 business?
Once you have the list, you can use a single Prompt with List action to display and search the company names (you can keep the list in a KM variable, text file, or the Prompt action itself; it doesn't matter) and selecting one will return the company's stock symbol.
In the background, I try to solve these, in my own way. Sometimes I won't post as to not embarrass myself. Here is my attempt to use regex. I'm sure there is a better way to match the pattern without the extra step but I was able to get results with this macro. I'll keep on my regex path though.