Example ====== Palette - Store ====== ^ by: | | ^ published: | October 2017 | ^ description: | Store a Palette | ^ remarks: | maybe useful as building block for other macros, and to explain the syntax | {{tag>palette store replace current}} ==== functions ==== * [[:macros:function:ActionScript.SetProperty]] * [[:macros:function:Palette.StoreCurrentPaletteReplace]] ==== affected properties ==== * [[:macros:property:Palette.CurrentPaletteHandle]] ===== Code ===== Store Palette 22 ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,2") Palette.StoreCurrentPaletteReplace() ===== 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]] * the property ''Palette.CurrentPaletteHandle''is set to a specific palette (''Location=Colours,2,2'' is the 2nd palette on page 2 in the Colours workspace window) * then ''Palette.StoreCurrentPaletteReplace()'' stores the contents of the programmer into this palette ===== How to use it ===== [[:macros:deploying|make this macro available]] Essentially this is more an example to show the syntax and use. However you can put some values into the programmer (select fixtures, set attributes), and then call this macro, in order to replace a particular palette. ~~DISCUSSION~~