A4000IS porting thread - page 13 - DryOS Development - CHDK Forum

A4000IS porting thread

  • 205 Replies
  • 76777 Views
Re: A4000IS porting thread
« Reply #120 on: 28 / June / 2013, 23:03:22 »
Advertisements
That would be so awesome! Will you give  me directions on what I have to do to load it too? Thanks!!!!!!

Re: A4000IS porting thread
« Reply #121 on: 28 / June / 2013, 23:15:44 »
That would be so awesome! Will you give  me directions on what I have to do to load it too? Thanks!!!!!!
Cut and paste from here into a plain text file using something like notepad.exe (UTF-8 bit characters).   Save it with the file name "extend.lua" .   Transfer that file to the /CHDK/SCRIPTS directory on your SD card.  Go to the CHDK Scripts menu,  select "Load script from file",  find the EXTEND.LUA file in the popup window,  press the "FUNC/SET" button to select,  then Menu to exit the CHDK menu.   After that, every time you press the shutter button while CHDK <ALT> mode is active, the script will run.

Code: [Select]
--[[
@title Extend
@param a time delay (sec)
@default a 2
@param s shots
@default s 5
--]]
if ( get_mode() == false ) then
    set_record(1)
    while ( get_mode() == false ) do sleep(100) end
end
sleep(a*1000)
for i=0, s do
  shoot()
  sleep(2000)
end

Update : And after you play with this for a bit,  I suspect you are going to want a programmable delay between shots?
« Last Edit: 28 / June / 2013, 23:18:11 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A4000IS porting thread
« Reply #122 on: 29 / June / 2013, 00:18:42 »
I did everything you said. But it's not loading in the CHDK scripts menu. I'm wondering if it's not the correct document type. It maintains a Text File extension while the other script (Shoot?) has a .lua extension. I'm not terribly technical. Is there something you can tell me I'm doing wrong?

Thanks!

Joe

Re: A4000IS porting thread
« Reply #123 on: 29 / June / 2013, 00:31:55 »
Should there be a .bas file associated with it? Like the other .lua files?


Re: A4000IS porting thread
« Reply #124 on: 29 / June / 2013, 01:31:36 »
I did everything you said. But it's not loading in the CHDK scripts menu. I'm wondering if it's not the correct document type. It maintains a Text File extension while the other script (Shoot?) has a .lua extension. I'm not terribly technical. Is there something you can tell me I'm doing wrong?
What computer are you using to do this?  And what application program are you trying to use to create the .lua file?  It needs to be called extend.lua if its going to work.  Sorry.

Should there be a .bas file associated with it? Like the other .lua files?
No.  The only reason there is a 1:1 match between the four files in the default CHDK distro is that somebody though it would be a good idea to include four simple scripts that might interest everyone as programming examples - and both a Lua and uBASIC version were included.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A4000IS porting thread
« Reply #125 on: 29 / June / 2013, 01:43:32 »
I'm using Windows Vista. Is there a difference between Notepad and Notepad.exe? I wonder if Wordpad will work. I'll try it.

Re: A4000IS porting thread
« Reply #126 on: 29 / June / 2013, 01:47:17 »
I'm using Windows Vista. Is there a difference between Notepad and Notepad.exe? I wonder if Wordpad will work. I'll try it.
SSDD.

This is turning out to be way too hard.  Download the attached file and put it in the /CHDK/SCRIPT directory on your SD card.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A4000IS porting thread
« Reply #127 on: 29 / June / 2013, 02:11:49 »
When I select "Load Script from File" I get "Fail to load fselect.flt: file not found
No popup menu of files.


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: A4000IS porting thread
« Reply #128 on: 29 / June / 2013, 03:15:59 »
Have you copied ALL files from the CHDK download package to the SD card of your camera. The error message says you need additional files that need to be on the sd card in the folder CHDK/MODULES. Then runs also the calendar.

msl
CHDK-DE:  CHDK-DE links

Re: A4000IS porting thread
« Reply #129 on: 29 / June / 2013, 09:07:09 »
Ok. I reloaded CHDK with ALL files (I beleive). I get other scripts to run except the extend.lua script written for me by waterwings. I get the error message:

:1: unexpected symbol near 'char(239)'

Any help appreciated. WATERWINGS - THANK YOU. I wouldn't have fixed some of the problems if you hadn't stepped up and written that script. It just looks like it needs a litttle tweeking. I did find that there is a script called interval.lua that essentially does the same thing ( more or less).

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal