no love for Lua? - page 2 - LUA Scripting - CHDK Forum supplierdeeply

no love for Lua?

  • 17 Replies
  • 7150 Views
*

Offline fe50

  • ******
  • 3134
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: no love for Lua?
« Reply #10 on: 29 / October / 2011, 08:45:13 »
Advertisements
Starting with

* http://chdk.wikia.com/wiki/Lua

you should be able to find almost all you want to know about the CHDK way of Lua scripting ;)

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: no love for Lua?
« Reply #11 on: 29 / October / 2011, 08:48:23 »
Starting with

* http://chdk.wikia.com/wiki/Lua

you should be able to find almost all you want to know about the CHDK way of Lua scripting ;)

Thanks! (I think I had seen this before, but must have forgotten to bookmark it -- corrected now :) )

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: no love for Lua?
« Reply #12 on: 29 / October / 2011, 10:40:22 »
Ok, so just a quick question re Lua (or general scripting) development as I am trying out various things ..

Do you all keep swapping your memory card between your camera and card reader each time you test your script (incl. of course firing up the camera, CHDK, and the script)?  This seems pretty cumbersome and I'm afraid I'll wear out my memory card  :)

Is there a more efficient way to do this? Can I update my scripts somehow via the USB cable with the memory card in the camera? (Sorry if this is described anywhere, if so I must have missed it)

Thanks
Esmail

Re: no love for Lua?
« Reply #13 on: 29 / October / 2011, 10:48:54 »
Can I update my scripts somehow via the USB cable with the memory card in the camera?
Take a look at the ptp stuff at http://chdk.wikia.com/wiki/PTP_Extension.  There are several clients for the PC (GUI or command line) floating around.  While the are not really compete or robust,  they are more than adequate for simply transferrring script files.

Personnally,  I use chdkptp.  There is a link in the above reference.  Takes a little work to figure out the command syntax - here's a few clues of a typical download and run sequence :


    C:\CHDK>chdkptp -i
    ___>list
    ___>c
    con>ls CHDK/SCRIPTS
         ....
    con 1>u c:/chdk/motion.lua  A\chdk\scripts\motion.lua
          ....
    con 2>= switch_mode_usb(1)
    con 3>= loadfile('A/CHDK/SCRIPTS/motion.lua')()


Don't forget to deselect  the "Enable Remote" option if you have been using a USB-remote.

« Last Edit: 29 / October / 2011, 11:27:56 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline esmail

  • *
  • 15
  • Canon S90
Re: no love for Lua?
« Reply #14 on: 29 / October / 2011, 12:59:46 »
Take a look at the ptp stuff at http://chdk.wikia.com/wiki/PTP_Extension.  There are several clients for the PC (GUI or command line) floating around.  While the are not really compete or robust,  they are more than adequate for simply transferrring script files.

Personnally,  I use chdkptp.  There is a link in the above reference.  Takes a little work to figure out the command syntax - here's a few clues of a typical download and run sequence :

...


Thanks, that's awesome information, I will take a look at this after I spend some time reading some of the documentation I downloaded (for instance now I know I was having problems with my script because I used 'sec' rather than 's' as a parameter to the script - didn't realize I have to use single char ids) - I clearly have much to read.

Esmail
ps: Looks like you have unixtools for Windows installed (like I do :) )

Re: no love for Lua?
« Reply #15 on: 29 / October / 2011, 13:23:17 »
ps: Looks like you have unixtools for Windows installed (like I do :) )

I assume you are referring to the use of ls ?   That's a command used at the command prompt in the chdkptp program - not a DOS command prompt thing.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: no love for Lua?
« Reply #16 on: 29 / October / 2011, 14:40:57 »
ps: Looks like you have unixtools for Windows installed (like I do :) )

I assume you are referring to the use of ls ?   That's a command used at the command prompt in the chdkptp program - not a DOS command prompt thing.

oops, yes, right you are ...

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: no love for Lua?
« Reply #17 on: 29 / October / 2011, 15:21:33 »
You can also try ptpCamGui (only for Windows). This little program has among other things a lua console for testing of lua scripts. You can also upload scripts.

msl
CHDK-DE:  CHDK-DE links


 

Related Topics