Avid ProTools timeline and/or playhead position as useful variable

Hi folks, I’m trying to have applescript capture the timeline position either as feet+frames or timecode, and then use that to either trigger something or stop an action. I just want to be able to have it read the timeline and return with info I can use.

One instance on how it would work is that, if I have a script that deletes audio clips in a track in ProTools, I’d want the script to stop at a certain point and not go through the whole track.

(ex: Script will begin deleting clips from beginning of track (0000+00) and at 1345+02, script will stop deleting clips.)

Please help!