Project CHDK hostlua for Windows with the editor Notepad++
- Project version 4.1
- CHDK version: 1.5, with adjustments for 1.3 Scripts
- Lizence: GPL2 (C)2012-2016 forum.chdk-treff.de
- Authors: rudi, msl
- Sources: https://subversion.assembla.com/svn/rudi_space/hostlua_npp
Description
- execute CHDK Lua scripts
- execute CHDK Lua scripts on camera emulator width virtual keyboard and display
- Editor with autocomplete and highlighting for CHDK keywords
- Function list for LUA functions and simple tables
additional with installed libusb driver
- execute CHDK Lua scripts on the camera
- upload files to the camera
- running of chdkptp commands
Software of other developers included in the package
- Notepad++ (Version 6.9.2) configured for project CHDK-hostlua, Extension NppExec for Notepad++ (Version 0.5.9.9 dev) Source: http://sourceforge.net/projects/npp-plugins/files/NppExec/
- CHDK emulator for Lua scripts (emu.lua, camera_funcs.lua), Autor reyalp, Source: http://trac.assembla.com/chdk/browser/trunk/tools/hostlua/emu, Not all CHDK Lua functions are available.
- Transferring of CHDK files to the camera and executing commands via PTP with the package chdkptp-r658-win32 and updates to trunk 706, Autor reyalp Source: http://www.assembla.com/spaces/chdkptp/
Requirements:
- PC with Windows
- libusb driver installed for the use of PTP
- Download: hostluaPortable.zip
Installation:
- Note that this installation procedure will not work if any of the file paths have spaces or special characters in them.
- Optional, but required for all PTP functions: installed libusb driver for using CHDK with PTP
- Unzip the folder "hostluaPortable" from hostluaPortable.zip to any destination.
- Configuration: Run file "config.cmd in main folder "hostluaPortable\"
- Start of Noptepad++ Portable via link "Start Notepad++" in the main folder "hostluaPortable\"
Operations
General
- Lua files are always subjected to a simple syntax examination.
File locations:
- CHDK files: "hostluaPortable\A\CHDK\..."
- Lua libraries: "hostluaPortable\A\CHDK\LUALIB\"
- Lua scripts: accepted from all folders, copy to the camera "A\CHDK\SCRIPS\".
- PTP command files have the extension ".ptp", accepted from all folders.
Available commands in Notepad++ console:
- CHDK LUA local > Execute Lua scripts in the CHDK script emulator.
- CHDK LUA local keypad > Execute Lua scripts in the camera emulator withvirtual keyboard and display.
> GUI keypad usage:
shortcut | description --------------------------------- [CTRL]+[UP] | button UP [CTRL]+[DOWN] | button DOWN [CTRL]+[RIGHT] | button RIGHT [CTRL]+[LEFT] | button LEFT [CTRL]+[ENTER] | button FUNC/SET [CTRL]+[h] | button SHOOT HALF [CTRL]+[s] | button SHOOT FULL [CTRL]+[v] | button VIDEO [CTRL]+[+] | button ZOOM IN [CTRL]+[-] | button ZOOM OUT [CTRL]+[m] | button MENU [CTRL]+[d] | button DISP. [CTRL]+[1] | button RC1 [CTRL]+[2] | button RC2 [CTRL]+[3] | button RC3 [CTRL]+[4] | button RC4 [F2] | toggle LCD width [F3] | LCD width 360 px [F4] | LCD width 480 px [ESC] | EXIT - break runnig script and close keypad
context menu: "LCD Width" ------+-- "LCD 360 px" +-- "LCD 480 px"
"Code Page" ------+-- "1250" +-- "1251" +-- "1252" +-- "1253" +-- "1254" +-- "1257"
"GUI Close Type" -+-- "On Exit Script" +-- "After 10 Seconds" +-- "On Lost Focus" "Exit"
- CHDK LUA remote > Transferring files to the camera and run Lua scripts on the camera.
- CHDK LUA remote output > The same as "CHDK LUA remote". In addition, the outputs of the script console output to the Notepad++ console at script end. Scripts will run a bit slower compared to "LUA CHDK remote".
- CHDK PTP > Processing of PTP commands with chdkptp. Command list under "hostlua\bin\chdkptp_USAGE.TXT" or usage.txt.
Usage
- Open a CHDK Lua file in Notepad++.
- Start console command in Notepad++
- with menu "Macro"
- context menu "CHDK hostlua"
- key [F6]
- Repeat last console command: [CTRL]+[F6]
Links
- Discussion about this project (German): http://forum.chdk-treff.de/viewtopic.php?f=7&t=3540
- Discussion about Lua development environments: http://chdk.setepontos.com/index.php?topic=2929.0