can't get a script to run - Script Writing - CHDK Forum supplierdeeply

can't get a script to run

  • 13 Replies
  • 4723 Views
can't get a script to run
« on: 22 / March / 2009, 08:44:10 »
Advertisements




hi, I'm new to the board. I just loade my A560 with chdk and everything seems to work including the supplied scripts. Howver, when I load any of the time lapse scripts I  get ubasic unkn stmt.

can you help?

thank you,
tom

Re: can't get a script to run
« Reply #1 on: 22 / March / 2009, 08:46:21 »
when I load any of the time lapse scripts I  get ubasic unkn stmt.


Can you list the script ?


David

Re: can't get a script to run
« Reply #2 on: 22 / March / 2009, 11:58:36 »
Thank you, David.

Let me preface this by saying that just getting thru the process of putting chdk on an sd card and running it on the camera was a major success story in my life. So I might not be too quick on the uptake with jargon. Hope you don't regret responding. ::)

here is the list I copied. I saved it as a word document and installed it to the chdk scripts folder on the sd card:

rem Author - Keoeeit
rem ReAuthor - Chuck
rem USE WITH CAUTION
rem do not run for many hours or days
@title Non-stop Long Exp Timelapse
@param a Interval (Minutes)
@default a 0
@param b Interval (Seconds)
@default b 30
@param c Interval (10th Seconds)
@default c 0
@param d Initial Delay (Seconds)
@default d 3
@param e Noise reduction (0=auto 1=off 2=on)
@default e 1
@param f Capture Raw Image (0 or 1)
@default f 1
@param g ISO (-1=hi,0=auto,1=80,..,5=800)
@default g 1

t=a*60000+b*1000+c*100
 
if t<100 then let t=5000
 
n=1
 
print "Interval shooting."
print "Until you interrupt it."
print "Use with caution."

sleep d*1000
 
rem Display mode off
rem 181 Display mode (Valid for record mode only) 0 = Show info icons, 1 = Do not show info icons, 2 = LCD is off, 3 = EVF.
rem This didn't seem to work for the A560
set_prop 181 2

goto "shot"
 
:shot
  print "Shot number", n
  set_raw_nr e
  set_raw f
  set_iso g
  set_tv96_direct -576
  shoot
  n=n+1
  sleep t
goto "shot"



Here is a link to that page:


http://chdk.wikia.com/wiki/UBASIC/Scripts:Long_Exposure_Intervalometer


thanks again for the trouble.

Tom :)

Re: can't get a script to run
« Reply #3 on: 22 / March / 2009, 12:43:51 »
I saved it as a word document

First of all, save it as a text file not a Word document.
Give it the extension .bas.

It still may not work but it is a start.


David


Re: can't get a script to run
« Reply #4 on: 22 / March / 2009, 15:28:11 »
Ah,
I did that, erased the old file, loaded it as .bas and still no luck. Am I supposed to be filling in values in other places like under 'extra photo operations', or should I be seeing the values in the script itself? In other words, is there something besides the script itself that needs to be enabled before it works? As I mentioned, I am so new to tis, I don't really know what's required to get it going.

Tom









i did

Re: can't get a script to run
« Reply #5 on: 22 / March / 2009, 16:14:28 »
Am I supposed to be filling in values in other places like under 'extra photo operations',

No, the current values of the script parameters can be seen if you enter Scripting menu with the time-lapse script loaded.
You can change the values there but leave at the default values for now.

Press the shutter button to start the script.

If the script runs there are two things that may cause you problems  ... the screen blanks and the exposure time is 65 seconds !

For now, change  'set_prop 181 2'  to 'rem set_prop 105 2'

The screen will not blank but later, if you remove 'rem' you can see if it works OK.


and change  'set_tv96_direct -576'  to  'set_tv96_direct -192'


That will give an exposure of four seconds instead of 65.



David

Re: can't get a script to run
« Reply #6 on: 22 / March / 2009, 18:30:24 »
David,

I will do this but just wantd to say I don't see the script at all- I get that message- ubasic unknwn stmnt-

The script title is at the bottom of the screen, but that message sits at the top in a shaky way looking like it wants to run but can't.

Tom

Re: can't get a script to run
« Reply #7 on: 22 / March / 2009, 20:01:04 »
I don't see the script at all- I get that message- ubasic unknwn stmnt-

Are you saying that you do not see any messages such as "Interval shooting",  "Until you interrupt it." or "Use with caution." ?

If so, there is something wrong with your script file.

What number comes after unknown stmnt ?


David


Re: can't get a script to run
« Reply #8 on: 22 / March / 2009, 21:46:37 »
That's correct, David. I see none of those messages.

I see on a red line at the top uBasic:1 Unk stat


One note. I had originally downloaded the CHDK A560 build onto the sd card. That is when I saw no options when I selected the script for the time lapse interval, and wrote my original post. Not only did the script not run ( just the ubasic unkn stmt), but there were no script parameters showing before I hit the shutter button to start.  This afternoon I had noticed some webpage describing that they used "allbest", so I found that and replaced the CHDK with allbest #58. With this prograam I now see a column of script parameters (Var a value, var b value, var c value), but the script still will not run.

I want to thank you for continuing to answer me. I have spent the afternoon and evening trying to get this to go, and it is frustrating. Is it possible that I am not copying the script correctly? What you saw in the earlier post is exactly what I loaded into the scripts folder and I did write the extension as .bas

Well, thanks again.

Tom

*

Offline reyalp

  • ******
  • 13401
Re: can't get a script to run
« Reply #9 on: 22 / March / 2009, 22:06:50 »
Unk stat means you script is not saved in the right format (edit: or is simply not valid code).

Allbest is very old. You should either use the latest autobuild, or SDM.
Don't forget what the H stands for.

 

Related Topics