How do I apply a pose through script

I want to apply a pose (e.g., a foot pose) to every key frame of an animation and I wanna do it through scripting. How do I load a pose through scripting and apply it to a figure node (in this case, a character)? Moreover, is it possible to open a file dialogue so I can choose the pose?
Comments
DzScene gives you methods for finding and selecting nodes, and for setting the current time (the frame, in effect).
DzNode would let you work down the figuer hierarchy to the feet, though you shouldn't need to with a pose preset
DzContentMgr will let you apply a preset.
DzFileDialog will give you a file requester.
Thanks, Richard! I've already managed to apply the pose using an absolute path. I'll use your tips to add the dialog box and refine the script.
Which objects must I tackle if I want to apply the pose to every keyframe of an animation (or every frame)? Are there any specific timeline objects?
Thanks!
A pose preset should apply if the figue or any of its bones are selected.
I see... But it's through scripting and I only managing to apply it to the first frame...
You'll probably need a loop in your script if you want to apply it to all frames, ie you set 1st frame as current time, apply pose, then set next frame as current time, apply the pose again, and so on.
Indeed, but I needed to get the position of every key frame, move the timeline pointer to each one of them, and, only then, apply the pose. I was struggling to understand how to do it since Daz doesn't have a dedicated timeline object (it's in the Scene object, and the keys are in the properties). I knew the logic (how to do a pseudocode) but not the intricacies thereof (which object and/or method to use).
Remeber that time is tracked in Ticks, not frames -
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz#a_1a29d3953deca61b53cb97e95b8b73ac34
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz#a_1a8b20c9c5f04e0fa79e7bd5335f87dc39
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz#a_1aef3ed273c7d75d5a78efeb9c93ce8875
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz#a_1aebe7f7523feb4a78261b7869d756f056
should help with matching the time to the desired frame.
Indeed, thanks! I'm using as reference a property that's already keyframed, so I get the time of its keys and move the timeline pointer according to the values I get, so I don't have to worry about converting ticks to frames and all is doing internally. But thanks. These setTimeStep() and getTimeStep() might come in handy one day.