Script to store name of selected object / curve, so that I can select again
for the selection part of things: Why not simply make the user select both items in a specific order? Blender stores the objects in selection order in this property:

bpy.context.selected_objects


That means, if you first select a cube, then a sphere, then a circle, the property content will be:

[bpy.data.objects['Cube'], bpy.data.objects['Sphere'], bpy.data.objects['Circle']]


To access them, you could use the index:

bpy.context.selected_objects[0]  # = first selected object
bpy.context.selected_objects[1]  # = second selected object
bpy.context.selected_objects[-1]  # = last selected object


Also, the last selected object will be the active one:

bpy.context.active_object