Can I suggest you use SDM rather than CHDK - it's much easier to switch between photo and movie modes and thus write the script you need. Here's something close:
rem SDM balloon photo/movie script
@param p number of photos per batch
@default p 3
@param i interval between photos (secs)
@default i 60
@param m length of movie (secs)
@default m 60
sync_off
while 1
for i = 1 to p
sleep_for_seconds i
shoot
next i
sleep 500
shoot_movie_for m
wend
As I hope you can see, this repeatedly takes 'p' photos, one every 'i' seconds, then shoots 'm' seconds of video. The defaults mean that it will take 3 photos, one every minute, then one minute of video.