Set active control point in script
You need to be in edit mode for this to work.

import bpy

i = 0  # this is the index of the bezier point you want

points = bpy.data.objects['BezierCurve']data.splines[0].bezier_points

bpy.ops.object.mode_set(mode = 'EDIT')

points[i].select_control_point = True

bpy.ops.object.hook_add_newob()

bpy.ops.object.mode_set(mode = 'OBJECT')


After setting the value, you may need to call:

points.update()


I can't find any docs on this, but others have had similar issues with this on mesh vertices and calling an update seems to re-synch blender.