Cycle marker Resizer

I’m looking to have a macro or a function to resize a cycle marker to the start and end of an audio ADR take. I can currently get the marker to resize when there is one take but the moment there are multiple takes under the same markers on different tracks it doesn’t work. This is what is in my macro.