I want to automate 'snapping' of layers rather than placing the next layer to the end of previous layer manually.
You could enable time-remapping and then subtract the out-point time from the actual time to shift around the playback, but well, that's essentially like trying to put out a fire with oil. In the end all those temporal expressions will slow down AE and prevent it from using e.g. MP-rendering plus you will have to figure it in every time you apply effects and other stuff. Far from an ideal workflow just to save two mouse clicks when otherwise you can easily drag around layers and snap them to markers, keyframes and other visible temporal demarcations just by holding down Shift...
Mylenium
Thanks a lot for the reply. I'll try that out.
I would still want to automate it because otherwise there are too many layers that I have to shift as for every new video I have different length of each layer. Also the effects and keyframes have to be moved which become very tedious job. I could control the keyframing using expressions but I need some way to automate things in timeline.
Thanks.