convert batch render functions into maxscript for using into state sets (3dsmax 2012 sap)

I am a maxscript nerd so I post my maxscript question also here
because I need this urgently...

I began to use the 3ds max 2012 state sets and
I realize that I need the scipt code how to insert all
the batch render functions:

1.
how to restore a scene state

2.
how to render in specific resolution

3.
how to save in tif format

thank you all again for any help.