Proposed changes to script parameters - page 5 - General Discussion and Assistance - CHDK Forum supplierdeeply

Proposed changes to script parameters

  • 52 Replies
  • 10088 Views
Re: Proposed changes to script parameters
« Reply #40 on: 12 / September / 2015, 11:52:55 »
Advertisements
i think that's a great idea ...
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Proposed changes to script parameters
« Reply #41 on: 12 / September / 2015, 14:07:12 »
A short video showing what the new @title usage does with a script that has many parameters (26 in this case).

« Last Edit: 12 / September / 2015, 14:37:45 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4218
Re: Proposed changes to script parameters : subtitles
« Reply #42 on: 12 / September / 2015, 14:57:06 »
Comments ?
No objections, seems useful.

*

Offline reyalp

  • ******
  • 12537
Re: Proposed changes to script parameters : subtitles
« Reply #43 on: 12 / September / 2015, 15:00:26 »
it seemed that the cleanist & easiest way to implement this was to just allow the @title macro to be used multiple times in a script (Lua or uBASIC),
I would really prefer to have separate keywords, re-using the @title seems confusing. Yes, there are already a lot of confusing things in CHDK already, but I'd rather not proliferate them. I'd prefer to have something like @sectiontitle even if it was functionally equivalent.

I do agree with there is a need to provide a way to show more detailed information.

As far as UI goes, I think using the separator style is reasonable for 1.4. For the long term (1.5), I'd like to see something like the "hints and tips" in modern canon firmware, where there is a fixed area that shows a more detailed description of each item as you highlight it. This would need a different kind of definition, since it would be per item.

On a somewhat related note:
The current code scans the first 4k of the script for params. rawopint is up to ~2.7k. With more @titles or similar descriptive strings, hitting 4k is not implausible.

Don't forget what the H stands for.


*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Proposed changes to script parameters
« Reply #44 on: 12 / September / 2015, 15:12:04 »
A nice and useful feature.

I agree with reyalp, an extra keyword would be better, e.g. @subtitle or so.

msl
CHDK-DE:  CHDK-DE links

Re: Proposed changes to script parameters
« Reply #45 on: 12 / September / 2015, 15:37:50 »
I agree with reyalp, an extra keyword would be better, e.g. @subtitle or so.
We actually started out doing it that way. IIRC, philmoz figured out that using @title allowed uBASIC to also have this feature with no additional coding needed.

As far as UI goes, I think using the separator style is reasonable for 1.4. For the long term (1.5), I'd like to see something like the "hints and tips" in modern canon firmware, where there is a fixed area that shows a more detailed description of each item as you highlight it. This would need a different kind of definition, since it would be per item.
UI features often come down to personal preferences.  I tend to find "hints and tips" somewhat annoying but that depends a bit on how they are implemented.  Screen space is often an issue here.
« Last Edit: 12 / September / 2015, 15:40:03 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Proposed changes to script parameters
« Reply #46 on: 12 / September / 2015, 15:58:56 »
philmoz figured out that using @title allowed uBASIC to also have this feature with no additional coding needed.
This is an argument. I could live with it. For beginners would be an extra keyword maybe better.

On the other hand is an uBASIC script with 20 or more parameter variables a torture. Who will write a big uBASIC script, if you have Lua.

msl
CHDK-DE:  CHDK-DE links

Re: Proposed changes to script parameters
« Reply #47 on: 12 / September / 2015, 16:18:25 »
Update patch file that implements a seperate @subtitle.  Works for both Lua and uBASIC.
« Last Edit: 12 / September / 2015, 16:23:29 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 12537
Re: Proposed changes to script parameters
« Reply #48 on: 12 / September / 2015, 17:04:29 »
Looks good to me, tried in both ubasic and lua.

Edit:
I would have checked in, but apparently I can't do that at the moment  :-[

edit:
Checked in, trunk 4248
« Last Edit: 12 / September / 2015, 18:23:42 by reyalp »
Don't forget what the H stands for.

Re: Proposed changes to script parameters
« Reply #49 on: 07 / November / 2015, 15:42:39 »
I've extracted the script header documentation from the various place I could find it in the wikia and created a new page just for the the script header that I linked to all the pages I found.   Now the script header documentation is all in one place. 

I also added some documentation for the "new" shorthand format and a couple of demo scripts.   I think I got most of it right but please edit if I missed anything?

One down,  a few hundred random pages to go.

Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics