example script

Hi to all.
I need an example of some script that contains a slider (in a panel) that by changing its numerical value automatically change something in the scene.
Thanks in advance. :D:D:D:D:D

Have you tried the basics? Like creating a sphere?

There is a panel called “Tools” If you press the T-Key while your mouse is over the 3D window, it will appear or disappear. It is a toggle.

Once you have the tools panel open, press SHIFT-A and add a mesh sphere.
The parameters for the sphere will appear in the lower section of the tools window, you may have to scroll down.
One of the parameters of the sphere is Size. If you move the slider, the size of the sphere will change interactively. All these scripts are already part of the system and you can examine and look at the code.

If you look in the Scripts/AddOns folder, you will see lots of code like add_mesh…

Take a look, it is all there.

I found this tutorial useful when making my first addon. It’s a tiny bit out of date (you now have to explicitly register your operator class - this used to happen automatically). Another great resource is this scripts cookbook.