ScriptLoop is a scripted looping plugin for Ableton Live. It allows you to automate the record/replay/arming of audio & midi tracks in arrangement view.
A new midi control track is required for each scripted track. Press Create control track to create the track. Or create your own track which must be named as: [track name]_Control.
For example: Piano > Piano_Control

I wanted to use Iftah's pre-arranger but it had one bug that really bothered me: If you record a clip and don't want to replay it immediately, the original clip will start playing for a short time even if you don't want to
I probably wanted some more features
It seemed fun to code. It was, but also it was not, and much longer and painful than anticipated.

Available commands:
rec [part name]: record audio for the duration of the rec clip.
play [part name]: replay audio recorded for the duration of the play clip. If you want to loop the clip, you need to duplicate the play clip as many times as needed. It will not be looped even if the clip is longer than the Rec clip.
arm: arms the track for the duration of the clip

Will record: Midi note, channel, pitch/bend. Other attributes (after touch, poly pressure) can be added.
Available commands:
rec [part name]: record midi for the duration of the rec clip.
play [part name]: replay midi for the duration of the play clip. If you want to loop the clip, you need to duplicate the play clip as many times as needed. It will not be looped even if the clip is longer than the Rec clip.
arm: arms the track for the duration of the clip
Quantization and quantization strenghth can be set via the Record Quantize options.