I have the following macro I use to open a project quickly in my editor:
I want to extend so that if this project is already open, it will switch to it and not call the open action again as that will create a new window with the project.
In order to do this, I think I need to do an if check that will scan through all my active windows and check if anything that has text - web-test inside it.
Only problem is I don't know how I can do this. KM doesn't seem to provide a native action for this and I searched around and couldn't find any applescript or JXA to do this.
Only thing I am curious about is why do I need to activate the app before triggering the Bring Window action. Without bringing VSCode as active app, bring window doesn't seem to work and I don't get why.