Linked sfwindowSliceString to sfwindow and accordinly modified the necessary arguments. Works
addapted sfwindow_script
working prototype for dchunks
it is working for chunks