alternative ways to start a script - page 3 - General Discussion and Assistance - CHDK Forum supplierdeeply

alternative ways to start a script

  • 30 Replies
  • 13597 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: alternative ways to start a script
« Reply #20 on: 01 / February / 2015, 21:26:13 »
Advertisements
But you have given me a new idea that might work for both of us.  How about when you press Func/Set on a script in the User Menu,  you get that script loaded and you get moved to the Script menu?   Seems like that might be just about perfect?

That seems more in keeping with the use of Func/Set on other menu items.
You might want to also consider adding the arrow indicator at the right end of the script menu item to indicate that it changes to a different menu when selected (change the menu item type to MENUITEM_SUBMENU_PROC).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline srsa_4c

  • ******
  • 4451
Re: alternative ways to start a script
« Reply #21 on: 01 / February / 2015, 21:30:57 »
So do we agree that being able to run a script directly from the User Menu (via a full presss) is a good thing?
I'm not opposing this feature, it can spare a click. (To be honest, I've never used the user menu for scripts.)

Quote
But you have given me a new idea that might work for both of us.  How about when you press Func/Set on a script in the User Menu,  you get that script loaded and you get moved to the Script menu?   Seems like that might be just about perfect?
It seems certainly much more useful than firing up a message box, so I'm OK with this, I guess.

Now, some others' opinions would be useful.

Re: alternative ways to start a script
« Reply #22 on: 01 / February / 2015, 22:16:58 »
To be honest, I've never used the user menu for scripts.
Bingo - thanks for that.

Like most of the core CHDK team,  we tend to add & program things for our needs as developers.  I think the User Menu (based on a recent dpreview post) is something end users can actually benefit from.

And as I've posted elsewhere, the whole empty <ALT> screen just scream out for stuff that users can use quickly and effectively.  Think the CHDKplus.lua script embedded there - not that you would specifically do that but it shows where this could go from a user perspective.

Now, some others' opinions would be useful.
The good part about the active CHDK community being fairly small is that we don't get into endless flame wars and other non-productive stuff.   The bad part is that only a few people respond and try things so feedback become a precious commodity.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ways to start a script
« Reply #23 on: 02 / February / 2015, 06:28:36 »
I use the user menu only for test purposes (or for writing the manual), probably like many other CHDK developer, maintainer or power users.

However, the user menu is a good thing for users who want to use a few functions quickly. Start or load of scripts is also a nice option. The patch goes to the right direction.

I've tested the patch v6. Full press the shutter starts the script. FUNC / SET shows the popup-window for loading the script. But you can not close the window with FUNC/SET for 'ok'.

My idea:

Full press shutter: Starts the script directly (works already fine).

FUNC/SET: Popup-window with 'ok/cancel' for loading of the selected script. By pressing 'ok' the script menu is displayed. (If possible the back function of the script menu bring you back to the user menu.)

msl
CHDK-DE:  CHDK-DE links


Re: alternative ways to start a script
« Reply #24 on: 02 / February / 2015, 19:58:20 »
But you can not close the window with FUNC/SET for 'ok'.
That is somewhat strange!   I"ve tested the patch on five of my cameras (A560, A1200, SD950, G10, S100)  and it works on all of them.  Pressing Func/Set closes the pop-up window every time.  I wonder why it does not work for you?

Quote
Full press shutter: Starts the script directly (works already fine).
FUNC/SET: Popup-window with 'ok/cancel' for loading of the selected script. By pressing 'ok' the script menu is displayed. (If possible the back function of the script menu bring you back to the user menu.)
More work for me but I like it.  I'm not sure where the "Back" function will take things but if it's not easy to do I might let that one go?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ways to start a script
« Reply #25 on: 03 / February / 2015, 09:08:55 »
I wonder why it does not work for you?
Really strange. I have tested with the A720 and the SX220 and got the same result. The pop-up windows goes into the background after the redrawing of the menu.

- user menu status [on]
- user menu as main menu [.]

I had delete the configuration - the same result.

msl
CHDK-DE:  CHDK-DE links

Re: alternative ways to start a script
« Reply #26 on: 03 / February / 2015, 10:12:57 »
Really strange. I have tested with the A720 and the SX220 and got the same result. The pop-up windows goes into the background after the redrawing of the menu.
So the Func/Set key actually does activate the Okay button and return you to the User Menu.  However, the text box does not close. 

I then see one difference - you have almost nothing in your User Menu whereas I'm testing with an almost full menu so if the box is still there, it's hidden by the full menu.  I'll retest your way - it's possible I missed a step needed to make the box actually go away?   I need to rework that code anyway to support the other things we talked about.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: alternative ways to start a script
« Reply #27 on: 03 / February / 2015, 13:44:18 »
Really strange. I have tested with the A720 and the SX220 and got the same result. The pop-up windows goes into the background after the redrawing of the menu.
So the Func/Set key actually does activate the Okay button and return you to the User Menu.  However, the text box does not close. 

I then see one difference - you have almost nothing in your User Menu whereas I'm testing with an almost full menu so if the box is still there, it's hidden by the full menu.  I'll retest your way - it's possible I missed a step needed to make the box actually go away?   I need to rework that code anyway to support the other things we talked about.

    gui_mbox_init(LANG_MENU_SCRIPT_LOAD, (int)fn, MBOX_BTN_OK|MBOX_TEXT_CENTER|MBOX_FUNC_RESTORE, NULL);

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


Re: alternative ways to start a script
« Reply #28 on: 04 / February / 2015, 22:14:10 »
    gui_mbox_init(LANG_MENU_SCRIPT_LOAD, (int)fn, MBOX_BTN_OK|MBOX_TEXT_CENTER|MBOX_FUNC_RESTORE, NULL);
Thanks (yet again) Phil.  Looks like there are quite a few mbox's that don't use this as they are always hidden by the CHDK menu when done.  I got unlucky and c&p'd one of those.

Updated patch file attached.  When the User Menu has a script name item selected, this one :
  • Launches script when shutter button is fully pressed.
  • If Func/Set pressed, brings up dialog box asking to load. If "Yes" then script loaded and Script menu is opened. Returns to user menu when "Back" menu item in Script menu is selected.
  • If Func/Set pressed, brings up dialog box asking to load. If "No" then it returns to User Menu with no change in currently loaded script.

I think that covers all the suggestions?  Thanks to srsa_4c & msl for that!
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ways to start a script
« Reply #29 on: 05 / February / 2015, 05:58:54 »
Thanks, works great. I would say, the patch is ready for the trunk.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal