I'm trying to make a simple macro to search between Safari Tabs. I have everything working from different pieces of codes I found around the forum and I managed to create a user input form that asks for a portion of the domain name it needs to look for from the Safari tabs.
But I would like to avoid using a visual input form and just to let KM listen the typed string after I press the hotkey trigger. So I could just press Command + Y for example, type "maestro", press enter and let it open this tab where I am writing right now without having anything appear on screen before the tab gets opened.
I tried to search everywhere for a way to save typed text in a variable but I haven't been lucky. How could I do that?
I also thought about doing It with a typed string trigger, with regex (for example .stmaestro, .stgoogle, etc) because I saw there is a variable for the trigger so I could just clean it and extract the real search term. That could be an option too I guess, but I would prefer the one in the OP.
The below Macro provides an example of how to do this.
This seems like a contradiction in terms to me.
CMD-Y would trigger the macro
But then you need a Prompt to receive the typed string "maestro"
And then "press enter" would close the prompt and continue execution of the macro.
So, it being unclear as to what you actually want, I have provided a macro that will work with either a Typed String trigger, or with a HotKey Trigger.
Remember that if you use a Typed String Trigger, you MUST type it into a document or text area that accepts text entry.
The "Prompt for User Input" is required if you use a HotKey Trigger, but not if you use a typed string trigger.
Using the Prompt has the advantage of remembering your last search string.
Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
I'm trying to make a simple macro to search between Safari Tabs. I have everything working from different pieces of codes I found around the forum and I managed to create a user input form that asks for a portion of the domain name it needs to look for from the Safari tabs. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~