Abstract: A machine for automatically driving object such as staples into a rod at substantially equally spaced intervals comprises a stapling device for driving staples into the rod, a driving assembly for moving the rod past the stapling device, and an indexing wheel contacting the rod so as to be driven to rotate by movement of the rod. A series of spaced switch activators such as pins on the wheel are positioned to operate one or more switches each time they rotate into contact with a switch. The activator for each switch is arranged to control operation of the stapling device, so that a staple is driven into the rod each time the switch is activated and a series of staples are driven into the rod at spacings controlled by the switch activator spacings. Where there is more than one switch corresponding to different staple spacings, a switch selector is provided to select any one of the switches for controlling the stapling device.