Here's a really quick example. It's not very convenient, but something to start with anyway.
I'm assuming you know how to copy the script to your camera and get into CHDK alt mode to access the CHDK menus. If not, I can post more detailed instructions.
You need to select the script in the CHDK script menu, which you can access by pressing SET in alt mode. This doesn't run the script, it makes it the script will run if you press the shutter button in alt.
When you want run it, press the shutter button fully in alt mode.
While the script is running, clicking the right button will act like turning the wheel one click clockwise, and the left button will act like rotating the wheel one click counterclockwise.
To exit the script, press SET or click the shutter again. To get back to the canon UI and shoot, you need to leave alt mode.