Page 1 of 1

merging macro probleme

Posted: 13 Apr 2021, 23:16
by cramboel
Hello i try to do a big macro to update my chase.

Code: Select all

      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step>
      <step>Programmer.SetBlindMode(false, 0)</step>
      <step>Group.RecallGroupNumeric(200)</step>
      <step>Group.RecallGroupNumeric(300)</step>
      <step>Palette.ApplyPalette("Location=Colours,2,10", false)</step>
      <step>ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,9")</step>
      <step>Palette.StoreCurrentPaletteReplace()</step>
      <step>Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false,
Expert.ClearMenu.FadeTime)</step>
      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step>
      <step>Programmer.SetBlindMode(false, 0)</step>
this code Work when alone in a macro BUT when i combine it with an other macro it stop record. it dont stop my macro from runing just the palette stop updating.

Code: Select all

      <step>ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,9")</step>
      <step>Palette.StoreCurrentPaletteReplace()</step>
This is isolated - think this is my probleme. Like i need to reset string and variable before isnt this but dont know how

Re: merging macro probleme

Posted: 13 Apr 2021, 23:34
by cramboel
maybe this is this that interfere but want can i do ?

Code: Select all

      <step>ActionScript.SetProperty("UserMacros.CurrentUserNumber", Handles.Colours.Page.Index)</step>
      <step>Handles.Colours.ChangePage(1)</step>
      <step>ActionScript.SetProperty("Palette.CurrentPaletteNumber",userNumber:200)</step>
      <step>Palette.StoreMenu.StoreOnButton("Colours", 9)</step>
      <step>Palette.StoreCurrentPalette()</step>
      <step>Handles.Colours.ChangePage(0)</step>

Re: merging macro probleme

Posted: 14 Apr 2021, 06:30
by icke_siegen
Hi,

I'd like to help you but I don't fully understand how you try to combine the macros. Could you post - or send me by email (s.beutel@trendco.de) - the complete code, and give me a hint what you want to achieve?

Thanks. Sebastian

Re: merging macro probleme

Posted: 14 Apr 2021, 19:56
by cramboel
Cant understand why this is not Working ...

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <!-- Automatically exported from Base Show Cyril - Capture soon full v15 - Titan Two 15.0.154.2 (DESKTOP-Q6GONKR) on 13-04-21 21:45:52. -->
  <macro id="UserMacro.Macro.CurrentColorVer2021.v003-part1">
    <name>.CurrentColor v003-part1</name>
      <sequence>
      
      <!-- Blind On -->
      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step> <!-- Blind -->
      <step>Programmer.SetBlindMode(false, 0)</step>
      
      <!-- Recall groupe 300 + touch ColorAttribute1 -->    
      <step>Group.RecallGroupNumeric(300)</step>   
      <step>Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",4)</step>
      <step>Programmer.Editor.Fixtures.SetContextAttributeFromWheelIndex(1)</step>
      <step>Programmer.Editor.Fixtures.TouchSelectedControls()</step>
      
      <!-- Recall groupe 200 + touch ColorAttribute1 -->
      <step>Group.RecallGroupNumeric(200)</step>   
      <step>Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",4)</step>
      <step>Programmer.Editor.Fixtures.SetContextAttributeFromWheelIndex(1)</step>
      <step>Programmer.Editor.Fixtures.TouchSelectedControls()</step>
      
      <!-- Palette+record+200+enter+confirm -->
      <step>ActionScript.SetProperty("UserMacros.CurrentUserNumber", Handles.Colours.Page.Index)</step>
      <step>Handles.Colours.ChangePage(1)</step>
      <step>ActionScript.SetProperty("Palette.CurrentPaletteNumber",userNumber:200)</step>
      <step>Palette.StoreMenu.StoreOnButton("Colours", 9)</step>
      <step>Palette.StoreCurrentPalette()</step>
      <step>Handles.Colours.ChangePage(0)</step>   
      
      <!-- Apply palette 200 -->
      <step>Palette.ApplyPalette("Location=Colours,2,10", false)</step>
   
      <!-- Ne fonctionne pas (quand combiné, macro Solo fine)---------------------------------------------------------------that Step dont work on this specific macro but alone in a .xml ( just update whats in programmer, Work -->
      
      <step>ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,9")</step>
      <step>Palette.StoreCurrentPaletteReplace()</step>
      
      <!-- <step>ActionScript.SetProperty("Palette.CurrentPaletteNumber",userNumber:10)</step> ------------------------------another way i  tried -->
      <!-- <step>Palette.StoreMenu.StoreOnButton("Colours", 8)</step> -->
      <!-- <step>Palette.StoreCurrentPalette()</step> -->

      <!-- Clear -->
      <step>Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false,
Expert.ClearMenu.FadeTime)</step>   
    
      <!-- Delete+palette+200+enter+Confirm -->
      <step>Menu.InjectInput("OnButtonDown","Delete","",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Delete","",0)</step>
      <step>Menu.InjectInput("OnSelect","Softkey","NoGroup",0)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.NumPad2","2",98)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.NumPad0","0",96)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.NumPad0","0",96)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.Return","",13)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.Return","",13)</step>
    
      <!-- Blind Off -->
      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step>
      <step>Programmer.SetBlindMode(false, 0)</step>
      
      <!-- Apply palette Colours,2,9 -->
      <step>Palette.ApplyPalette("Location=Colours,2,9", false)</step>
    
      </sequence>
  </macro>
</avolites.macros>

I need it to work or have a way to "macro 1 execute macro 2" -
"i have annoted ("that Step dont work on this specific macro but alone in a .xml ( just update whats in programmer, Work") in the "code"
The bellow annotation is another way i tried ( that dont work neither )

Re: merging macro probleme

Posted: 14 Apr 2021, 21:13
by cramboel
Finnally have it to work.
i'm doing a loop with my macro, that does'nt make any sens to me.

Any clue how i can optimized it and make it only handle=location(only)
(for the create palette and delete)

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <!-- Automatically exported from Base Show Cyril - Capture soon full v15 - Titan Two 15.0.154.2 (DESKTOP-Q6GONKR) on 13-04-21 21:45:52. -->
  <macro id="UserMacro.Macro.CurrentColorVer2021.v007">
    <name>.CurrentColor v007</name>
      <sequence>
      
      <!-- Blind On -->
      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step> <!-- Blind -->
      <step>Programmer.SetBlindMode(false, 0)</step>
      
      <!-- Recall groupe 300 + touch ColorAttribute1 -->    
      <step>Group.RecallGroupNumeric(300)</step>   
      <step>Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",4)</step>
      <step>Programmer.Editor.Fixtures.SetContextAttributeFromWheelIndex(1)</step>
      <step>Programmer.Editor.Fixtures.TouchSelectedControls()</step>
      
      <!-- Recall groupe 200 + touch ColorAttribute1 -->
      <step>Group.RecallGroupNumeric(200)</step>   
      <step>Menu.InjectInput("OnSelect","AttributeGroup","NoGroup",4)</step>
      <step>Programmer.Editor.Fixtures.SetContextAttributeFromWheelIndex(1)</step>
      <step>Programmer.Editor.Fixtures.TouchSelectedControls()</step>
      
      <!-- Palette+record+200+enter+confirm -->
      <step>ActionScript.SetProperty("UserMacros.CurrentUserNumber", Handles.Colours.Page.Index)</step>
      <step>Handles.Colours.ChangePage(1)</step>
      <step>ActionScript.SetProperty("Palette.CurrentPaletteNumber",userNumber:200)</step>
      <step>Palette.StoreMenu.StoreOnButton("Colours", 9)</step>
      <step>Palette.StoreCurrentPalette()</step>
      <step>Handles.Colours.ChangePage(0)</step>   
      
      <!-- Apply palette 200 -->
      <step>Palette.ApplyPalette("Location=Colours,2,10", false)</step>
   
      <!-- Ne fonctionne pas (quand combiné, macro Solo fine) -->
      
      <step>ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,9")</step>
      <step>Palette.StoreCurrentPaletteReplace()</step>

      <!-- Clear -->
      <step>Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false,
Expert.ClearMenu.FadeTime)</step>   

      <!-- Loop -->
      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step>
      <step>Programmer.SetBlindMode(false, 0)</step>
      <step>Group.RecallGroupNumeric(200)</step>
      <step>Group.RecallGroupNumeric(300)</step>
      <step>Palette.ApplyPalette("Location=Colours,2,10", false)</step>
      <step>ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,9")</step>
      <step>Palette.StoreCurrentPaletteReplace()</step>
      <step>Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false,
Expert.ClearMenu.FadeTime)</step>
    
      <!-- Delete+palette+200+enter+Confirm -->
      <step>Menu.InjectInput("OnButtonDown","Delete","",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Delete","",0)</step>
      <step>Menu.InjectInput("OnSelect","Softkey","NoGroup",0)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.NumPad2","2",98)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.NumPad0","0",96)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.NumPad0","0",96)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.Return","",13)</step>
      <step>Menu.InjectInput("OnSelect","Keyboard.Return","",13)</step>
    
      <!-- Blind Off -->
      <step>ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step>
      <step>Programmer.SetBlindMode(false, 0)</step>
      
      <!-- Apply palette Colours,2,9 -->
      <step>Palette.ApplyPalette("Location=Colours,2,9", false)</step>
    
      </sequence>
  </macro>
</avolites.macros>

Re: merging macro probleme

Posted: 15 Apr 2021, 07:48
by icke_siegen
Hi,

again I really would like to help but please explain what you want to achieve, which result you expect and where you see an error.

Macros can be combines with something like RecallMacroById, see https://www.avolites.de/wiki/macros:fun ... lmacrobyid

Also - albeit I still don't fully understand what you're up to: sometimes it helps to give the steps a little pause, in particular as you combine native macro functions with menu inputs. See https://www.avolites.de/wiki/macros:step_pause for details

Finally an example for storing a palette to a specific handle by location: https://www.avolites.de/wiki/macros:exa ... orepalette - actually you already used this in your 'Loop' section. So. what exactly is your question?