Thank you!
Well, I was wondering if anyone has already made a script for this that I could use as a skeleton, and that covers everything, since as I said I find it hard to follow the example scripts and the sfall functions are not too well documented.
Anyway, I tried some more and got to...