Thanks for adding details, and sorry for sounding harsh, that was not my intend. You can download a reference annotation in GTF format and then load it into R with e.g.
rtracklayer::import(). This will give you a GRanges object which you can then filter for TSS and TTS. This would then be your
windows input. TSS would simply be the start of annotated transcripts (or the end if they are on the minus strand), and TTS vice versa, so start coordinate if on the minus strand and end if on the plus strand.