Like most, my Chrome browser is always filled with several tabs. There is one tab in particular that I would like to program a macro to be able to click on / activate within the several tabs that are open. Is there a way to, say, "click on a tab with the name _____" or something similar? There is a series of things that I would like to have happen AFTER this tab is selected, but need to figure out how to have this tab get selected in the first place. Any help would be appreciated!
Thanks for your help, Steve. I'm afraid that I'm still a little bit confused. The function of the macro that I'm trying to program is to get to a specific Google Chrome tab, making it into the current one (when it would actually not be current at the moment). I clicked on the link that you had sent, but I wasn't quite sure what I was looking at.
I would use a loop and inside the loop, get the tab name, compare it with the name you are looking for (using variables), then the Chrome shortcut keystroke to select the next tab and then return to beginning. The CHROMETABCOUNT() function at the beginning will tell you when to exit the loop.
I used this fantastic macro for many months, but a few months back I started getting an error that I could not resolve. Thus I created a similar macro for myself that I could share if Dan's macro doesn't work for you. (I haven't shared it on the forum because it hasn't been throughly tested and it is not well-documented.)
Hi, @dragonfliesmusic. After reading your request again, I would definitely recommend that you go directly to @ccstone's method. @DanThomas's macro and mine are designed to reopen a tab if a tab for a given URL is already open; if an existing tab is not found, a new tab is opened for the specified URL.
Wow man.....this is intense! I'm going to admit that I'm still a little bit lost. I don't know what AppleScript is. But I've downloaded the file titled "Bring a Named Tab to the Front v1.00" (did you create this somehow?) and I've successfully imported it into KM. Interesting. If I'm understanding this correctly, I need to enter in the name of the tab that I want to activate, right?
If so, I tried entering that information into the place that says "Set variable", but it still didn't seem to work. Is there somewhere else that I'm supposed to enter it?
All good, my friend! I'm checking it out now as we speak. I'm still a little confused in general, but only because I'm still trying to learn the terminology (not because of your response). Much appreciated to have a community of helpful people like this!
Macro and parent macro group are active (thank you for that; I didn't realize that they had to be made active).
Allow JavaScript from Apple Events - check!
However, I'm still not quite clear on what exactly I am supposed to type and where. You said "The tab-name user-setting is pretty obviously documented in the macroemphasized text**. Yes, I did see that. But am I supposed to erase what it currently says (local_TabNameSearchStr) and replace that with the name of the tab that I would like it to search for? If so, I did just that, but it still doesn't appear to be working....
In this instance, the tab name is Mail - Maki, Todd - Outlook.
I've typed that into the space that says "Set Variable":
That action now reads as "Set the variable named Mail - Maki, Todd - Outlook to the text MacScripter". You've changed the name of the variable but should have changed the contents.
Put the name back to what it was -- local_TabNameSearchStr -- then change MacScripter to Mail - Maki, Todd - Outlook.