Problem running sript - General Help and Assistance on using CHDK stable releases - CHDK Forum

Problem running sript

  • 12 Replies
  • 759 Views
Problem running sript
« on: 04 / April / 2020, 00:54:02 »
Advertisements
I've been using (and appreciating!) CHDK in my sx50 for several years, including running the odd script, without much trouble.

However I recently passed on my older sx50 to my son so he could use it for videos, with the idea he could overcome the 4GB limit by using one of the scripts allowing several to be automatically strung together - and we can't get it to run.  The message "No @chdk_version, assuming CHDK 1.3" keeps appearing. 

I tried the fix suggested in a November thread (adding "@chdk_version 1.3" to the header section), but still no luck.  What is the "header section"?  The first line?  Add it to the beginning of that, or the end?  With a space in between, or no?  Nothing I've tried has worked so far.
(I copied the script to a text document, and added the "lua" suffix as recommended, but once on the SCRIPT menu it still appears as a text document rather than a lua file.  Does that matter?  If so, how does one fix it?

Any clarification would be appreciated.

*

Offline reyalp

  • ******
  • 12630
Re: Problem running sript
« Reply #1 on: 04 / April / 2020, 03:41:02 »
However I recently passed on my older sx50 to my son so he could use it for videos, with the idea he could overcome the 4GB limit by using one of the scripts allowing several to be automatically strung together - and we can't get it to run.  The message "No @chdk_version, assuming CHDK 1.3" keeps appearing. 
This message should not prevent the script from running. It tells you that it is running in 1.3 compatible mode, because there is no version tag. So if the script doesn't work, there is likely some other problem.

Adding @chdk_version 1.3 in the header should stop the message, but not change anything else. For an example of a script with the correct syntax, you can look at default.lua included in the CHDK package.
Don't forget what the H stands for.

Re: Problem running sript
« Reply #2 on: 04 / April / 2020, 13:02:31 »
Thanks reyalp.  Looking back, I guess I misunderstood the point of putting in "@chdk_version 1.3".
The fact remains though that I can't make the script do anything.  I press Load script, then the Record button...and nothing happens.  (The button does work, because if I leave CHDK and then press on it, I get a video that lasts 3.99 GB; then the camera stops.)
I know next to nothing about programming.  The bit under "Running a script" seems clear enough and I did all that - but it doesn't say anything about text documents etc., and following any of the "Useful links" immediately gets me in completely over my head.
I'll try a little longer though.  Thanks again.



Re: Problem running sript
« Reply #3 on: 04 / April / 2020, 13:55:15 »
I should add that I've also tried just pushing the shutter button, also with no response.
When I do that though, I notice that a message appears saying STARTED ubasic 3 Parse error TERMINATED (but not when I push the Record button).


Re: Problem running sript
« Reply #4 on: 04 / April / 2020, 16:41:33 »
I should add that I've also tried just pushing the shutter button, also with no response.
When I do that though, I notice that a message appears saying STARTED ubasic 3 Parse error TERMINATED (but not when I push the Record button).
Okay - first things first.  What script are you trying to run?  Please post a link to it, or attach the actual file as an attachment here.

The only way to start a script running [1] is to press the shutter button when you are in <ALT> mode.   For reference, when <ALT> mode is active it will display the red <ALT> symbol at the bottom center of the screen showing CHDK is in charge of the camera and that you can open CHDK menu's and run CHDK scripts.

Only when you see that STARTED message are you are correctly starting a script to run.  The error message that shows up next usually means the script file you are trying to use is invalid.  There can be several reasons for that but the most likely here is that you have saved a Lua language file in a manner that leads CHDK to believe it's a uBASIC file.  That won't work - the file name has to have a .lua externsion.

So, post what you are using?


edit : [1] well technically you can have a script autostart several ways. But that knowledge is not useful here
« Last Edit: 04 / April / 2020, 17:08:42 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Problem running sript
« Reply #5 on: 04 / April / 2020, 18:21:41 »
I'm using the third option on the CHDK page  https://chdk.fandom.com/wiki/Continuous_Video_Scripts.(I tried option 1b initially, which is in ubasic and which I suffixed with .bas, but when it didn't work and the message "assuming CHDK 1.3" came up, I figured that the script must be obsolete, so moved on to option 3 - it being the only other one designed for cameras with a Record button.)

What I did was just copy/paste the program from the CHDK page to a text file, add the .lua suffix, then transfer that to the CHDK SCRIPT file on my SD card before inserting it in the camera.

Re: Problem running sript
« Reply #6 on: 04 / April / 2020, 19:28:19 »
I'm using the third option on the CHDK page  https://chdk.fandom.com/wiki/Continuous_Video_Scripts.(I tried option 1b initially, which is in ubasic and which I suffixed with .bas, but when it didn't work and the message "assuming CHDK 1.3" came up, I figured that the script must be obsolete, so moved on to option 3 - it being the only other one designed for cameras with a Record button.)

What I did was just copy/paste the program from the CHDK page to a text file, add the .lua suffix, then transfer that to the CHDK SCRIPT file on my SD card before inserting it in the camera.
I have several versions of that script from way back - playing with different options and functionality.  But for now, let's start with a known good working file.

I've attached a tested & working version of the posted script. Copy to file into the SCRIPTS folder on your SD card, insert into camera, select it from the CHDK Script menu and press the shutter key to run it. 

Tell us what happens.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Problem running sript
« Reply #7 on: 04 / April / 2020, 20:46:32 »
Thx.  Just loaded it onto my card, inserted it, got to the Load Script from File and clicked that; the name of the program appeared in the bottom left, so I pressed the Shutter button while still in ALT.
 
The camera didn't respond; I only get a brief flash of a message saying "reload ('wrap 13')
 'A/CHDK/SCRIPTS/wrap13.lua
IB/wrap13.lua'
***TERMINATED***


*

Offline reyalp

  • ******
  • 12630
Re: Problem running sript
« Reply #8 on: 04 / April / 2020, 20:57:48 »
Thx.  Just loaded it onto my card, inserted it, got to the Load Script from File and clicked that; the name of the program appeared in the bottom left, so I pressed the Shutter button while still in ALT.
Make sure you installed the "full" version of CHDK, not the "small" zip from the autobuild site.
Don't forget what the H stands for.

Re: Problem running sript
« Reply #9 on: 04 / April / 2020, 21:56:51 »
Make sure you installed the "full" version of CHDK, not the "small" zip from the autobuild site.
I think @reyalp had identified your latest problem.

Which raises the question of how you actually installed CHDK?  While you can just expand the full CHDK distribution file to your SD card, that leaves you using the painful "Firmware Update" method to re-install CHDK every single time you turn your camera on.  There are two great utilities available that you can use to install CHDK so that it loads automatically every time you start your camera. Easy to remove too.
« Last Edit: 04 / April / 2020, 21:58:39 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics