I am afraid I don’t really understand what your goal is. You have three clocks: ES clock, TT internal (metro) clock and an external clock, right?
Which one do you want to devide and what do you mean by setting up a clock devider, using an external clock, corresponding to the ES clock and against the TT metronome?
Maybe you could elaborate a bit what you want to actually happen musically?
On a side note, I wonder if this is more TT specific than ES specific and you might get more help on the TT scripting thread.