For doing ColourLike frame-by-frame, try this:
function ColourLikeFrameByFrame(clip c1, clip c2)
{ # Color-matches c1 to c2, frame by frame.
# Assumes c1 and c2 are the same length and are
# both compatible with ColourLike.
global c1 = c1
global c2 = c2
return c1.ScriptClip("""
ca = c1.Trim(current_frame, -1)
cb = c2.Trim(current_frame, -1)
ca.WriteHistogram("hist1.txt", 1)
cb.WriteHistogram("hist2.txt", 1)
ca.ColourLike("hist1.txt", "hist2.txt")
""")
}