User Tools

Site Tools


macros:action_and_menus

Action and Menus

When dealing with macros you'll soon learn that even simple actions might require several steps: in general, programming is a very fine-grained business.

One of the aspects of this is that the menu - which is displayed to you - is independent from the things which are going on inside the programm. And while there might be measures in place to keep menus and the core in sync, there are also occasions where it is your duty to deal with this. In doubt, try to find out if there is a variable you need to set.

One clear example are the Enable/Disable Timecode macros. For testing, I modified the macros and programmed a cuelist to run from the internal timecode. The modified macros are available here: modifiedtimecodemacros.xml

  • <step>Timecode.SetEnabled(true)</step> would be all it needs to enable the timecode timer inside the program. However, this does not change the menu to 'Timer Enabled'.
  • In turn, <step>ActionScript.SetProperty.Boolean(“Timecode.Enabled”, true)</step> sets the menu to 'Timer Enabled', and really enables the timer. However, this works only if the timecode menu is open - if it isn't, then this command has no effect.
  • Hence, the solution is to do both:
    • <step>ActionScript.SetProperty.Boolean(“Timecode.Enabled”, true)</step> sets the menu to 'Enabled', and sets the variable which happens to affect the computing core
    • <step>Timecode.SetEnabled(Timecode.Enabled)</step> directly enables the timer in case the menu isn't open

It is always a good idea to test your macros under various conditions - in particular, with various menus open.

further readings

2017/10/13 15:12 · icke_siegen
You could leave a comment if you were logged in.
macros/action_and_menus.txt · Last modified: 2017/11/19 15:27 by icke_siegen