Exit script in Lua - General Help and Assistance on using CHDK stable releases - CHDK Forum  

Exit script in Lua

  • 2 Replies
Exit script in Lua
« on: 16 / May / 2021, 11:07:39 »
Hope someone can help?
I currently use set_exit_key("down") to exit my script in ALT mode.
What I need to do is also call a function to tidy things up, which I do elsewhere in the script.
So the question is: is there a way to get CHDK Lua to call one of my functions when the script terminates?
I know I could use a a no key version of set_exit_key("no_key") and handle the down button myself, but I was hoping the CHDK Lua may have an option to call a user function?


Offline reyalp

  • ******
  • 14093
Re: Exit script in Lua
« Reply #1 on: 16 / May / 2021, 14:12:20 »
Don't forget what the H stands for.

Re: Exit script in Lua
« Reply #2 on: 16 / May / 2021, 14:15:37 »
Many thanks.

In fact, subliminally, I must have read that and forgotten, as I have a restore() in my script ;-)




Related Topics

SimplePortal 2.3.6 © 2008-2014, SimplePortal