User Tools

Site Tools


macros:example:offonattributeinpalette

Example

Off/On Attribute in Palette

by: Alex del Bondio, November 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5928
description: macro to turn an attribute group off resp. on in a palette
remarks: Idea/request by PascalvE

This macro assumes that group 999 and palette 999 exist. Group 999 is used as temporary store for the selected fixtures. The macro turns colour values in palette 999 off resp. on.

There is a follow-up thread in the forum explaining how this can be done entirely with coded functions: http://forum.avolites.com/viewtopic.php?f=20&t=5936

This has been reproduced in this wiki here: Off/On Attribute (snippets)

functions

affected properties

Code

offOnAttributeInPalette.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
 
  <macro id="adb.Macros.colourvaluesoffblind" name="adb set colour values off in blind">
    <sequence>
      <step>Group.ReplaceGroupOnHandle(userNumber: 999)</step>
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step>	
      <step pause="0.01">Programmer.SetBlindMode(false, 0)</step>
 
      <step>Group.RecallGroup(userNumber: 999)</step>
      <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
      <step pause="0.001">Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",4)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonDown","Off","",0)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonUp","Off","",0)</step>
      <step pause="0.001">Menu.InjectInput("OnSelect","Softkey","NoGroup",2)</step>
      <step pause="0.001">Palette.QuickMergePalette(userNumber: 999)</step>
      <step>Programmer.Editor.Clear(All, true, false, 0)</step>
 
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step>
      <step pause="0.01">Programmer.SetBlindMode(false, 0)</step>
    </sequence>
  </macro>
 
  <macro id="adb.Macros.colourvaluesonblind" name="adb set colour values on in blind">
    <sequence>
      <step>Group.ReplaceGroupOnHandle(userNumber: 999)</step>
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step>	
      <step pause="0.01">Programmer.SetBlindMode(false, 0)</step>
 
      <step>Group.RecallGroup(userNumber: 999)</step>
      <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
      <step pause="0.001">Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",4)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonDown","Off","",0)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonUp","Off","",0)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonDown","Off","",0)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonUp","Off","",0)</step>
      <step pause="0.001">Menu.InjectInput("OnSelect","Softkey","NoGroup",2)</step>
      <step pause="0.001">Palette.QuickMergePalette(userNumber: 999)</step>
      <step>Programmer.Editor.Clear(All, true, false, 0)</step>
 
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step>
      <step pause="0.01">Programmer.SetBlindMode(false, 0)</step>
    </sequence>
  </macro>
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

This macro assumes that group 999 and palette 999 exist. Group 999 is used as temporary store for the selected fixtures. The macro turns colour values in palette 999 off resp. on.

  • Group.ReplaceGroupOnHandle puts the currently selected fixtures into a group as temporary store
  • then, blind mode is entered - see Blind Mode On/Off
  • Group.RecallGroup recalls the previously selected fixtures from the temp. store
  • the next commands are taken from a recorded macro:
    • Menu.Stack.PushOrReloadMenu makes sure we are in the root menu
    • Menu.InjectInput are the recorded key presses:
      • [C] (colour)
      • <Off> (in the second macro <Off> is pressed twice which makes it toggle to On)
      • [Attribute Off]
  • Palette.QuickMergePalette merges the off/on value into the palette
  • Programmer.Editor.Clear clears the programmre
  • finally the blind mode is being exited from

How to use it

  • make sure group 999 and palette 999 exist and suit your needs or adapt the macro
  • fire the macro to turn colour off resp. on in this palette
You could leave a comment if you were logged in.
macros/example/offonattributeinpalette.txt · Last modified: 2019/03/09 17:17 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki