Frame based application logic

What is the cleanest way to implement frame based scripting or logoc flow? ie on frame 20 run script A then on frame 40 make camera 2 inactive etc etc,
Is it simply a matter of putting everything in a single script with a bunch of if else statements and constantly checking current frame or is there a better way?

TimerCHOP and Segments are exactly that. Check to Snippets.
Depending on What kind of logic you can then define your actions in a clas, module or extension and map them via a dictionary. You can then use the onSegmentEnter callback of the timer to call a specific function,.