what is your Lua script writing environment like? - page 7 - LUA Scripting - CHDK Forum

what is your Lua script writing environment like?

  • 63 Replies
  • 37159 Views
*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: what is your Lua script writing environment like?
« Reply #60 on: 18 / January / 2015, 12:46:56 »
Advertisements
Update emu.lua for table index 1. Fix wrong line number on error messages for params.

rudi

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: what is your Lua script writing environment like?
« Reply #61 on: 06 / April / 2015, 04:16:57 »
There is an update for the CHDK hostlua environment. Now the environment works fine with CHDK 1.4. I highly recommend the complete package for notepad++ like described here: http://chdk.wikia.com/wiki/Execute_Lua_scripts_with_hostlua_%26_notepad%2B%2B

Thx rudi for the great work.

msl
CHDK-DE:  CHDK-DE links

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: what is your Lua script writing environment like?
« Reply #62 on: 19 / June / 2015, 08:36:53 »
Execute Lua scripts with hostlua and Notepad++

Version 3.0 is out now.

New in this version is a virtual camera keyboard and a realistic LCD screen output. 29 functions have been specially prepared for this virtual interface:
Code: [Select]
cls(), console_redraw(), draw_clear(),
draw_ellipse(), draw_ellipse_filled(),
draw_line(), draw_pixel(), draw_rect(),
draw_rect_filled(), draw_string(),
file_browser(), get_draw_title_line(),
get_gui_screen_height(),
get_gui_screen_width(),
get_tick_count(), get_usb_power(),
is_key(), is_pressed(), print(),
print_screen(), set_backlight(),
set_console_autoredraw(),
set_console_layout(),
set_draw_title_line(), set_exit_key(),
set_lcd_display(), sleep(), textbox(),
wait_click()

Especially key and USB remote control functions can be tested. You can see, how are working your print and draw commands.

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14128
Re: what is your Lua script writing environment like?
« Reply #63 on: 17 / December / 2024, 23:55:39 »
I guess hardly anyone uses this, but for completeness...
In addition to the updated parameter handling and added functions mentioned https://chdk.setepontos.com/index.php?topic=12961.40 that are only relevant when running from the command line.

Before r6300, you could set params from the command line lie -a=1 -b=2, but only single char names were supported. In r6300, long names can be set like myvar=1, and table / enum values can be set using by value like myvar.value=Foo

As of r6300, you can also load saved settings as found in the CHDK/DATA directory in scriptname.1 etc, using -loadparams=filename. Any values set on the command line override values from the file.
You use -saveparams=filename to save a new script setting file, with values merged form script defaults, -loadparams and the command line.

Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal