Waterwingz (talk | contribs) Tags: Visual edit apiedit |
(→C First use of NppExec:: typo) Tag: sourceedit |
||
Line 51: | Line 51: | ||
===C First use of NppExec:=== |
===C First use of NppExec:=== |
||
− | * Installation of the Plugin via |
+ | * Installation of the Plugin via Notepad ++ menu "Settings > Import > import Plugin(s)..."select "hostlua\plugin_NppExec\NppExec.dll" |
* Close Notepad++ |
* Close Notepad++ |
||
* Copy all files from subdir "hostlua\plugin_NppExec\config" to: |
* Copy all files from subdir "hostlua\plugin_NppExec\config" to: |
Revision as of 17:11, 14 July 2015
Project CHDK hostlua for Windows with the editor Notepad++
- Project version 3.0
- CHDK version: 1.4, with adjustments for 1.3 Scripts
- Lizence: GPL2 (C)2012-2015 forum.chdk-treff.de
- Authors: rudi, msl
- Sources: https://subversion.assembla.com/svn/rudi_space/hostlua_npp
- execute CHDK Lua scripts on a Windows PC
- execute CHDK Lua scripts on the camera
- upload files to the camera
- running of chdkptp commands
Software of other developers included in the package
- Extension NppExec for Notepad++ (Version 0.5.31) 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
- Transferring of CHDK files to the camera and executing commands via PTP with the package chdkptp-r658-win32 and updates to trunk 666, Autor reyalp, Source: http://www.assembla.com/spaces/chdkptp/
Requirements:
- PC with Windows
- Editor Notepad++ (installed or portable)
- libusb driver installed for the use of PTP
- hostlua.zip
Installation:
- Unzip the folder "hostlua" from hostlua.zip to any destination.
- Configuration of Notepad++ console: select A or B
A Local Notepad++ Portable (directory: hostlua\Notepad++Portable)
New installation Notepad++ Portable
- Download of Notepad++ from http://portableapps.com http://portableapps.com/apps/development/notepadpp_portable
- saving in the folder hostlua\
- Run file "NotepadPlusPlusPortable_x.x.x.x.paf.exe" and store files to default location hostlua\Notepad++Portable. !!! Do not check "Run Notepad++Portable"
Configuration
- Run file "local_config.cmd in subfolder "hostlua\plugin_NppExec"
Start of local Noptepad++ Portable
- via the "Start Notepad++" in the main folder hostlua\
B with installed Notepad++ or Notepad++ Portable (not unpacked as point A)
- Run file "create_config.cmd" in subfolder "hostlua\plugin_NppExec".
- select C: or D:
C First use of NppExec:
- Installation of the Plugin via Notepad ++ menu "Settings > Import > import Plugin(s)..."select "hostlua\plugin_NppExec\NppExec.dll"
- Close Notepad++
- Copy all files from subdir "hostlua\plugin_NppExec\config" to:
- select E: or F:
- E: installed Notepad++: "C:\Users\<Benutzername>\AppData\Roaming\Notepad++\plugins\config"
- F: portable Notepad++: "...\Notepad++Portable\Data\Config\plugins\config\"
D NppExec is already in use:
- Close Notepad++
- Add/Update the content of "hostlua\plugin_NppExec\config\npes_saved.txt" in the file npes_saved.txt in ...
- select E: or F:
- E: installed Notepad++: "C:\Users\<Benutzername>\AppData\Roaming\Notepad++\plugins\config"
- F: portable Notepad++: "...\Notepad++Portable\Data\Config\plugins\config\"
- Check the setting in Notepad++ menu "Pugins => NppExec => Console Output...{ANSI/ANSI}"
- Recommendation: activate the setting in Notepad++ menu "Plugins => NppExec => Save all files on Execute"
Operations
General
Lua files are always subjected to a simple syntax examination. File locations:
- CHDK files: "hostlua\A\CHDK\..."
- Lua libraries: "hostlua\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 CHDK script emulator with virtual 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.
> The Lua command set_record() can be used despite PTP connection.
- 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++ menu "Macro"
- Repeat last console command: CTRL+F6
Links
- Discussion about this project (German): http://forum.chdk-treff.de/viewtopic.php?f=7&t=2973
- Discussion about Lua development environments: http://chdk.setepontos.com/index.php?topic=2929.0