Example ====== ColourChaseChanger (old style) ====== ^ by: | Jonas Nijs, Aug. 2016 | ^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=4823 | ^ description: | changes the colours of a color chase to any color you want | ^ remarks: | This is an old, recorded, macro, and reproduced here for reference. | ^ ::: | Also see the author's remarks on how to use it [[#how_to_use_it|(below the code)]] | ^ ::: | [[http://forum.avolites.com/viewtopic.php?f=20&t=4823|In the original post]] there is also a short manual linked which you might find helpful. | {{tag>change chase blind colour recorded}} ==== functions ==== * [[macros:function:menu.stack.pushorreloadmenu]] * [[macros:function:menu.injectinput]] ===== Code ===== Color chase changer Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program") Menu.InjectInput("OnButtonDown","Blind.0","NoGroup",0) Menu.InjectInput("OnButtonUp","Blind.0","NoGroup",0) Menu.InjectInput("OnButtonDown","Group.0","NoGroup",0) Menu.InjectInput("OnButtonUp","Group.0","NoGroup",0) Menu.InjectInput("OnButtonDown","NumericKeys.1","NoGroup",1) Menu.InjectInput("OnButtonUp","NumericKeys.1","NoGroup",1) Menu.InjectInput("OnButtonDown","NumericKeys","",0) Menu.InjectInput("OnButtonUp","NumericKeys","",0) Menu.InjectInput("OnButtonDown","NumericKeys","",0) Menu.InjectInput("OnButtonUp","NumericKeys","",0) Menu.InjectInput("OnButtonDown","KeypadEnter.0","NoGroup",0) Menu.InjectInput("OnButtonUp","KeypadEnter.0","NoGroup",0) Menu.InjectInput("OnButtonDown","View.0","NoGroup",0) Menu.InjectInput("OnButtonUp","View.0","NoGroup",0) Menu.InjectInput("OnButtonDown","AttributeGroup.4","NoGroup",4) Menu.InjectInput("OnButtonUp","AttributeGroup.4","NoGroup",4) Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",34) Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",34) Menu.InjectInput("OnButtonDown","SelectPage","Colours",1) Menu.InjectInput("OnButtonUp","SelectPage","Colours",1) Menu.InjectInput("OnButtonDown","Record.0","NoGroup",0) Menu.InjectInput("OnButtonUp","Record.0","NoGroup",0) Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",0) Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",0) Menu.InjectInput("OnButtonDown","Softkey.1","NoGroup",1) Menu.InjectInput("OnButtonUp","Softkey.1","NoGroup",1) Menu.InjectInput("OnButtonDown","SelectPage","Colours",0) Menu.InjectInput("OnButtonUp","SelectPage","Colours",0) Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",35) Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",35) Menu.InjectInput("OnButtonDown","SelectPage","Colours",1) Menu.InjectInput("OnButtonUp","SelectPage","Colours",1) Menu.InjectInput("OnButtonDown","Record.0","NoGroup",0) Menu.InjectInput("OnButtonUp","Record.0","NoGroup",0) Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",1) Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",1) Menu.InjectInput("OnButtonDown","Softkey.1","NoGroup",1) Menu.InjectInput("OnButtonUp","Softkey.1","NoGroup",1) Menu.InjectInput("OnButtonDown","SelectPage","Colours",0) Menu.InjectInput("OnButtonUp","SelectPage","Colours",0) Menu.InjectInput("OnButtonDown","Clear.0","NoGroup",0) Menu.InjectInput("OnButtonUp","Clear.0","NoGroup",0) Menu.InjectInput("OnButtonDown","Blind.0","NoGroup",0) Menu.InjectInput("OnButtonUp","Blind.0","NoGroup",0) ===== Explanation ===== This explains the functional steps within the sequence. For all the other XML details please refer to [[macros:formats_and_syntax#xml_format|Formats and syntax]] As this is a recorded macro, instead of explaining the function, we translate the button presses (see [[macros:console_and_simulator]] for an explanation of how this is written here), and explain their results: // enter blind mode <1> <0> <0> // group 100 [C](olours) // opens/activates colour palette window [Colour Palette Button 35] // set selected fixture group to colour 34 [Colour Page 2] // change page in colour palette window [Colour Button 1] [Replace] // this replaces the colour palette [Colour Page 1] // change page in colour palette window [Colour Palette Button 36] // set selected fixture group to colour 35 [Colour Page 2] // change page in colour palette window [Colour Button 2] [Replace] // this replaces the colour palette [Colour Page 1] // change page in colour palette window // clear programmer // exit blind mode Effectively we enter blind mode, replace the palettes which are used for some chasers with other colours (which are taken from other colour palettes), and exit blind mode again. ===== How to use it ===== - [[macros:deploying|make this macro available]] - make a color chase that uses color pallets - place those color pallets on the color pallets windows page 2 positions 1 and 2 - create a group for all the fixtures used in that color chase and give that group usernumber 100 - when you want to change the colors, place the 2 new colors you want on the color pallets page 1 positions 35 and 36 (will be the two bottom right ones when you go full screen and supper size. - run the macro and have fun. [[http://forum.avolites.com/viewtopic.php?f=20&t=4823|In the original post]] there is also a short manual linked which you might find helpful. //That's a perfect example for both: what you can acchieve with macros, and where the limits are. In that case, the use of variables would be really helpful. E.g. if I could pass target and source palette numbers as argument, I could easily re-use this macro many times. Another possible error: this macro assumes that the colours window opens on the correct page, which might not be the case. [S. Beutel]// ~~DISCUSSION~~