Window switch API


Is it possible to switch window by name using actions? Also, I would like to get list of open windows with BTT. I am trying to make tools to switch windows searching this list and changing to selected window with scripting.

I tried window switcher, but I would love a more flexible solution.