Custom properties

hello, how can i move a cube(it’s a example) with a slider(custom property[‘prop’]) without drivers.?

it’s this but in the properties panel:

import bpy
class AddGem(bpy.types.Operator):

bl_idname = “mesh.primitivegemadd”
bl_label = “AddGem”
bl_description = “Create an offset faceted gem.”
bl_options = {‘REGISTER’, ‘UNDO’}
segments = bpy.props.FloatProperty(name=“Segments”,
description=“Longitudial segmentation”,
min=0.0,
max=1.0,
default=0.8,)
def execute(self, context):
bpy.data.objects[‘Cube’].location.x = self.segments
return {‘FINISHED’}
bpy.utils.register_class(AddGem)

thank you, and sorry for my english:o

you need to add an operator with button then you’ll be able to change it and it will affect the object cube location!

there must an example for this in that script that you can use

happy 2.5

thanks, but i want make it like a shape key no with button operator