select non-app windows

Similar to Launch Application, or cycle windows if active - #2 by Andreas_Hegenberg, I'm trying to cycle between active windows for a given application. The link suggests hard-coding per-shortcut which is fine, but one of the windows I want to cycle through does not register as a regular (?) application.

Notably, if I run the following applescript (adapted from here) to get all of the current windows:

tell application "System Events" to get every window of ¬
	(every process whose background only is false)

among the output I get

{
  {window "Quartz 2 [*]" of application process "R" of application "System Events"},
  {window "BetterTouchTool Configuration" of application process "BetterTouchTool" of application "System Events"}
}

I have set a trigger on the keyboard shortcut option 2 with an action of "Activate Specific Window". With an app name of .*BetterTouchTool.*, it works fine. If I change the app name to .*R.* or .*Quartz.*, nothing happens. (Similarly, "window title" does not work.)

("R" is a programming language, and this one window is a graphics canvas for plots. The R app itself is a terminal/tty app being run inside of emacs, completely separate from the plot window.)

How can I switch between not-really-an-app windows?

In the end, I'd like to (a) cycle between active windows, and perhaps (b) remember the previous window of that app that was selected (perhaps the OS will do this for me?). This is all meant to mimic my muscle-memory of windows' Win-2 (which selects and cycles between windows of the second app on the taskbar). (Please don't hate me for trying to map my windows shortcuts to mac. I'm a very keyboard-centric programmer and would prefer to keep my "efficiencies" close to intact.)