Hi Kim,
the following code works for me
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
<macro id="Avolites.Macros.StorePaletteInt8" name="Store Palette Int 8">
<description>Store Palette Int 8</description>
<sequence>
<step pause="0.01">Selection.Context.Programmer.SelectFixtures("Fixtures", {1,2,3})</step>
<step pause="0.01">Programmer.Editor.Fixtures.SetControlValueById(240,1,1,true,true)</step>
<step pause="0.01">Programmer.Editor.Fixtures.SetControlValueById(256,1,0,true,true)</step>
<step pause="0.01">Programmer.Editor.Fixtures.SetControlValueById(272,1,0,true,true)</step>
<step pause="0.01">ActionScript.SetProperty("Palette.CurrentPaletteNumber", userNumber:8)</step>
<step pause="0.01">Palette.StoreMenu.StoreOnButton("Colours", 8)</step>
<step pause="0.01">Palette.StoreCurrentPalette()</step>
</sequence>
</macro>
</avolites.macros>
Explanation:
Code: Select all
ActionScript.SetProperty("Palette.CurrentPaletteNumber",1)
throws a casting error (see log collector) because the userNumber needs to be an object, not an Int. Solution: cast it with userNumber:1.
Code: Select all
ActionScript.SetProperty("Palette.CurrentPaletteHandle", Handles.GetHandle("Colours",0,0))
completely breaks the script (don't ask me why)
Code: Select all
ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,0,0")
compiles but doesn't work (the palette is recorded but unassigned). I guess this would work only with a currently assigned handle.
Thus, abusing the menu helps:
Code: Select all
Palette.StoreMenu.StoreOnButton("Colours", 8)
The only problem is that this always references the current palette page. I don't know if there is a way to record a palette on an arbitrary palette page - there are some functions which simply only work with the current page. Maybe Gregory can shed more light on this.