custom macro question

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

PascalvE
Posts: 11
Joined: 08 Sep 2013, 23:42

custom macro question

Postby PascalvE » 01 Nov 2018, 22:00

Hello all

I'm trying to make a custom macro on my titan mobile.
the macro have to do the following thing.

Go in to blind wha i already have.
then select a group. Then putt the colour attribute to off.
write it to a palette by user number clear the programmer and go out of the blind mode.

also one doing the same thing only putt the colour attribute back to on.

I'm already searching in the macro wiki and api site but can't find the good way to make it.
maby some one in here can help me.
Graetz Pascal

Avolites titan Mobile user
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: custom macro question

Postby sideshowbond » 03 Nov 2018, 08:59

Hi Pascal,

I'll just quickly post what I got so far. It is a mix of recorded and coded macros. I'll try and edit the recorded to API syntax as well at a point but for now it works so far.

Code: Select all

   <!-- delete group 999 -->
          <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
          <step pause="0.001">Menu.InjectInput("OnButtonDown","Delete","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnButtonUp","Delete","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnButtonDown","Group","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnButtonUp","Group","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.Return","",13)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.Return","",13)</step>

   <!-- store selection as group 999 -->
         <step>Group.StoreGroup(userNumber: 9999)</step>

   <!-- enter blind -->
          <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step>   
          <step pause="0.01">Programmer.SetBlindMode(false, 0)</step>

    <!-- select fixtures -->
         <step>Group.RecallGroup(userNumber: 9999)</step>

   <!-- set colour to off -->
      <!-- http://api.avolites.com/11.0/Programmer.Editor.Fixtures.OnOffAttributeSelected.html -->
          <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>

    <!--record palette - this only works with shared or normal palettes -->
          <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
          <step pause="0.001">Menu.InjectInput("OnButtonDown","Palette","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnButtonUp","Palette","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
         <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
          <step pause="0.001">Menu.InjectInput("OnSelect","Keyboard.NumPad9","9",105)</step>
          <step pause="0.001">Menu.InjectInput("OnButtonDown","Exit","",0)</step>
          <step pause="0.001">Menu.InjectInput("OnButtonUp","Exit","",0)</step>


What does the record colour macro look like that you mentioned you already have?
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: custom macro question

Postby sideshowbond » 05 Nov 2018, 10:42

in the attached xml there macros to set colour values on or off in blind and store that into a palette. It uses group number 999 (can even be unassigned) to transfer fixture selection from live to blind and records the values into palette number 999 (you can of course change those in notepad++).

One part of it has not been coded yet which the bit to set the values to either on or off but uses a recorded macro instead.

Have fun.

adb_setcolouronoffblind.xml
(3.42 KiB) Downloaded 456 times
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: custom macro question

Postby sideshowbond » 05 Nov 2018, 11:00

one thing still to mention: this macro only works when there is a group 999 already existing. It does not record a new group.

Who is online

Users browsing this forum: No registered users and 19 guests