How to create script that toggles one value in synclient?

view story

http://unix.stackexchange.com – I use synclient touchpadoff=1 to disable touchpad and synclient touchpadoff=0 to enable touchpad. $synclient | grep TouchpadOff TouchpadOff = 1 I'd like to create script that will toggle this value. Then I will bind to key in OpenBox. (HowTos)