Example ====== Attribute Wheels And Palette Windows ====== ^ by: | Alex del Bondio | ^ published: | November 2018 | ^ description: | Changes the attribute wheels and opens the corresponding palette window | ^ remarks: | | {{ :macros:example:adb.attributewheelsandpalettes.xml }} {{tag> palette window wheel attribute }} Every button of those highlighted in the groups window in the picture basically does the following things: * open a window (mostly palette but also the attribute editor or shape library) * sets the right page in the window (like in the Gobos and Beams window in the picture) * set the wheels to the corresponding attribute (it also cycles the attributes when there are more than 3 like the attribute bank button does to) {{:macros:adb.attributewheelsandpalettes.png?direct&300|}} The code below is an example for one attribute type (Position). The file contains macros for all attribute types. ==== functions ==== * [[:macros:function:Windows.SetWindowProperty.X]] * [[:macros:function:Windows.SetWindowProperty.Y]] * [[:macros:function:Windows.SetWindowProperty.Width]] * [[:macros:function:Windows.SetWindowProperty.Height]] * [[:macros:function:Windows.Scrolling.Vertical.Scroll]] ==== affected properties ==== * [[:macros:property:Windows.windowid.ButtonSize]] * [[:macros:property:Windows.windowid.TextSize]] * [[:macros:property:Windows.windowid.FixedColumns]] * [[:macros:property:Windows.windowid.FixedRows]] * [[:macros:property:Windows.windowid.Pages]] * [[:macros:property:Windows.windowid.CurrentPage]] ===== Code ===== Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",2) Windows.SetWindowProperty.X("Windows.Positions", 0) Windows.SetWindowProperty.Y("Windows.Positions", 1) Windows.SetWindowProperty.Width("Windows.Positions", 2) Windows.SetWindowProperty.Height("Windows.Positions", 1) ActionScript.SetProperty.Enum("Windows.Positions.ButtonSize", "Fixed") ActionScript.SetProperty.Enum("Windows.Positions.TextSize", "Global") ActionScript.SetProperty.Integer("Windows.Positions.FixedColumns", 12) ActionScript.SetProperty.Integer("Windows.Positions.FixedRows", 5) ActionScript.SetProperty.Boolean("Windows.Positions.Pages", true) ActionScript.SetProperty.Integer("Windows.Positions.CurrentPage", 0) Windows.Scrolling.Vertical.Scroll(-100000) ===== 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]] Set Times * ''Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",2)'' selects the attribute on the wheels (1=Intensity, 2=Position, 4=Colour, 8=Gobo, 16=Beam, 32=Effects, 64=Special, 128=Shapes) * '''' opens the positions palette window * ''Windows.SetWindowProperty'' is used to define position and size of the palette window * ''ActionScript.SetProperty.x()'' is used to set other window properties ===== How to use it ===== * [[:macros:deploying|make this macro available]] ~~DISCUSSION~~