How to set autofade + interpolation + oversample _after_ sample has finished recording?

Hi, I’m trying to set up my samples so that autofade, interpolation and oversample are set after a sample has been recorded.

But when I try to just do this:

renoise.tool():add_menu_entry{name = "--Sample Editor:Paketti:Start Sampling (Record)", invoke=function() sample_and_to_sample_editor()[].samples[].autofade=true[].samples[].interpolation_mode=4[].samples[].oversample_enabled=true

it says:

*** ./recorder.lua:82: attempt to index field '?' (a nil value)
*** stack traceback:
***   ./recorder.lua:82: in function <./recorder.lua:79>

so, what should i do, can i set some sort of a “create notifier before starting sampling, use notifier to set sample preferences, delete notifier” mess?

and how complex would it be?