Renderpreset with Script and some other newbie asks?

Hi people,
has here two problems.

1-st part of the Scripts should do the following Shadow_mr_sky and mr_spot off do if this in the scene are still activated advertisement Tm and Sky activate. The Shadowplane if she should be Renderable, place on not Renderable. So this functions also everything, however, he should select one more Renderpreset and the gerenderte picture store away as png with alpha and in 24 bit.

Script Part 1:

$shadow_mr_sky.enabled = off
$shadow_mr_spot.enabled = off
$Spot_TM.enabled = on
$Sky01.enabled = on
$shadowplane.renderable = off
actionMan.executeAction 0 "40068" -- Views: Camera View
actionMan.executeAction 0 "50031" -- Render: Render

Part 2: Advertisement tm and sky put out, activate for it shadow mr sky and shadow spot, everything what with Feometry zutuen has up to shadowplane doe Visibility on off do shadown plans visibility and renerable in. Jeodch he does not activate mr spot, in addition how I can inform him he determined Layer where Obejkte are on it hiden has to go. Finder help, unfortunately, only Animationslayer. In addition, these will be several pictures he should store away. For example, Render A Shadow A Render a1 Shadow a1 etc.

Script Part 2:

$Spot_TM.enabled = off
$Sky01.enabled = off
$shadow_mr_sky.enabled = on
$shadow_mr_spot.enabled = on

select geometry
deselect $shadowplane
$.primaryVisibility = off
$shadowplane.primaryVisibility = on
$shadowplane.renderable = on

actionMan.executeAction 0 "40068" -- Views: Camera View
actionMan.executeAction 0 "50031" -- Render: Render

I hope anybody can help me please -.-