is it possible to have dynamic menu items in a script? - Script Writing - CHDK Forum

is it possible to have dynamic menu items in a script?

  • 2 Replies
  • 73 Views
*

Offline Mlapse

  • ***
  • 211
  • A480 A490 S95 M10
is it possible to have dynamic menu items in a script?
« on: 09 / October / 2019, 13:41:40 »
Advertisements
the title says it all.
example:
I have 2 similar value sets, like: 0,5 0.6 0.8 1 1.3 1.6 2
if i choose 1 as first value, the second value choice should only have to contain numbers up until 1.

so after choosing a value in the first set i would like to limit the choices of the second set accordingly.

how would i go about creating a dynamic menu entry? like FI is used in the enhanced photo operations part of the menu?


« Last Edit: 09 / October / 2019, 14:20:28 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 12102
Re: is it possible to have dynamic menu items in a script?
« Reply #1 on: 09 / October / 2019, 21:11:21 »
so after choosing a value in the first set i would like to limit the choices of the second set accordingly.
Unfortunately, this is not possible. Each menu item defined in the script header is standalone, independent of the others.

I've wanted things like this too, but at the same time, I'd be reluctant to add to much complexity to the menu system.
Quote
how would i go about creating a dynamic menu entry? like FI is used in the enhanced photo operations part of the menu?
Hack https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/core/gui_script.c I guess

Alternatively, you could implement the options interactively in the script, using the console or drawings and keyboard input.
Don't forget what the H stands for.

*

Offline Mlapse

  • ***
  • 211
  • A480 A490 S95 M10
Re: is it possible to have dynamic menu items in a script?
« Reply #2 on: 10 / October / 2019, 02:22:50 »

Unfortunately, this is not possible. Each menu item defined in the script header is standalone, independent of the others.

I've wanted things like this too, but at the same time, I'd be reluctant to add to much complexity to the menu system.

Was afraid the answer would be something like this.
And yes, i'm reluctant too to add more because i want to keep the script as lightweight as possible and user friendly settings are often just the opposite...as pointed out with your posted link to hack
« Last Edit: 10 / October / 2019, 02:39:44 by Mlapse »
frustration is a key ingredient in progress

 

Related Topics