Hi,
I am trying to run macros in a group in Chrome when the window title contains either (Builder)
or (Template)
.
Per a few past topics, I set the condition to: (Builder) | (Template)
but it doesn't work for example on a page having the title of Team (Template)
.
It works if I set it to just (Template)
.
Is there a way to tell it to also match when the window title contains (Builder)
?
Any idea?
Use this regex:
((Template|Builder))
and matches condition
4 Likes
Also, you can add multiple conditions and set to "if any of the following are true"
2 Likes
Hi,
I am trying to accomplish something very similar to @Sridhar: type a keystroke when my application (Skim a .pdf file reader) launches only when the title of my .pdf file contains a specific word (dictionnaire or Dictionnaire).
I have red the wiki. Tried @Zabobon solution (it worked, thank you!) but I think, in the future, I'll prefer a solution where I can modify my conditions by only adding a word.
That's why I tried to make @macdevign_mac solution work. And failed.
I guess it comes from the fact I don't know how to verify if the title of the .pdf file I do open contains the words I use as a condition.
Below is the screenshot of my macro:
Any help would be appreciated
I don't see any reference to a window title in your macro—you need to be matching on a window title containing, and your conditional is just checking either a word or a global variable (which isn't set in this macro, so it can't be the current document title) against the regex.
I think you need something like this:
The %WindowName%1%
token returns the name of the frontmost window, and the regex should make sure it matches your search terms. I haven't tested this, though.
EDIT: You may also need a delay after launch to let the document open before you check the If/Then.
-rob.
1 Like
Thank you so much rob, you brought the missing piece of logic I was looking for.
I also looked at tokens but couldn't figure how to make all the things work together as I was looking too much at @Sridhar question thinking only changing values would be enough.
1 Like