redraw curve to reduce points

 From:  noskule
3838.3 
thanks that works. I would like to build a shortcut which uses the options Mode:Refit, Tolerance 0.05, Delete input objects. The command should execute automatically without confirmation (rightclick). Is there a script template which I could use?
Thanks for any hints
nos