Script Runs Backwards - page 2 - Script Writing - CHDK Forum

Script Runs Backwards

  • 12 Replies
  • 3879 Views
*

Offline NSS

  • *
  • 26
Re: Script Runs Backwards
« Reply #10 on: 14 / September / 2010, 19:19:11 »
Advertisements
tried that too,  and still  records short times  paand pauses long times.

UG!

*

Offline reyalp

  • ******
  • 13457
Re: Script Runs Backwards
« Reply #11 on: 14 / September / 2010, 21:19:57 »
tried that too,  and still  records short times  paand pauses long times.
You need to debug your script in a methodical way. Break it down to the simplest case (e.g. press and release full shoot once). Figure out what actually happens: Does it start recording or not... If it doesn't, experiment until you find a way to get it to reliably start recording. Once you have that sorted out, add the next part (sleep some time and press and release shoot again to stop recording)

There may be a bug somewhere, but in order to figure that out you will have to clearly characterize what is actually happening.

Some general suggestions:
- press shoot_half before shoot_full. The camera make get confused if shoot_full appears on it's own. Some time between the two may also be helpful.
- release in the opposite order
- allow some time between press and release
- in general, make your button sequences as close as you can to what an actual human would do.
- allow enough time for the camera to finish "processing" before trying to shoot the next video.
Don't forget what the H stands for.

*

Offline NSS

  • *
  • 26
Re: Script Runs Backwards
« Reply #12 on: 14 / September / 2010, 22:54:43 »
BULLSEYE!

Thats all it needed,  the old camera must be just a little slow and stupid.  for when i did simulate a finger pressing the buttons,  it works!!!  this is what I tried,
sleep 3000
press "shoot_half"
sleep 1000
press "shoot_full"
sleep 1000
release "shoot_full"
sleep 1000
release "shoot_half"
sleep 10000
press "shoot_half"
sleep 1000
press "shoot_full"
sleep 1000
release "shoot_full"
sleep 1000
release "shoot_half"


and it recorder,  13 seconds tho  why  I'm not too sure.  but then  I just added another layer, to it like this,
sleep 3000
press "shoot_half"
sleep 1000
press "shoot_full"
sleep 1000
release "shoot_full"
sleep 1000
release "shoot_half"
sleep 10000
press "shoot_half"
sleep 1000
press "shoot_full"
sleep 1000
release "shoot_full"
sleep 1000
release "shoot_half"
sleep 10000
press "shoot_half"
sleep 1000
press "shoot_full"
sleep 1000
release "shoot_full"
sleep 1000
release "shoot_half"
sleep 10000
press "shoot_half"
sleep 1000
press "shoot_full"
sleep 1000
release "shoot_full"
sleep 1000
release "shoot_half"

and it recorded 13 seconds of video,  waited ten seconds and then recorded 13 seconds of video again

  awesome.  Now to adjust the numbers for the real times I want  and i think i'll have it!

Thanks So  very Much!

Joe

 

Related Topics