User Tools

Site Tools


macros:recorded_vs._coded_macros

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
macros:recorded_vs._coded_macros [2017/10/29 16:24] – ↷ Page moved from recorded_vs._coded_macros to macros:recorded_vs._coded_macros icke_siegenmacros:recorded_vs._coded_macros [2017/11/28 15:24] (current) icke_siegen
Line 12: Line 12:
  
 While macros already make a powerful tool, there is still lots of headroom. To spare you some time, here are some hints on things with are currently (Titan v10.1) **not possible** with macros: While macros already make a powerful tool, there is still lots of headroom. To spare you some time, here are some hints on things with are currently (Titan v10.1) **not possible** with macros:
-  * variables +  * more user input (like parameters)
-  * more user input +
-  * conditions+
   * loops (while, for, each, until)   * loops (while, for, each, until)
   * breakpoints (run until a certain point, wait for a trigger, then proceed)   * breakpoints (run until a certain point, wait for a trigger, then proceed)
Line 91: Line 89:
 ==== Investigating the recorded macro ==== ==== Investigating the recorded macro ====
  
-At some point you'll stumble across the [[example:exportmacro|Export Macro]] and you are curious enough to export the above chaser macro (give this the usernumber 1, retrieve and execute the export macro, and open the exported macro). The result will look like this:+At some point you'll stumble across the [[macros:example:exportmacro|Export Macro]] and you are curious enough to export the above chaser macro (give this the usernumber 1, retrieve and execute the export macro, and open the exported macro). The result will look like this:
  
 <code xml> <code xml>
Line 124: Line 122:
 Again we only explain the functional steps within the sequence. (For all the other XML details please refer to [[macros:formats_and_syntax#xml_format|Formats and syntax]]) Again we only explain the functional steps within the sequence. (For all the other XML details please refer to [[macros:formats_and_syntax#xml_format|Formats and syntax]])
  
-  * all ''<step ...>'' tags also contain a 'pause' property: ''pause="0.001"''. This is only a minor thing, and is discussed in [[Using pause]]+  * all ''<step ...>'' tags also contain a 'pause' property: ''pause="0.001"''. This is only a minor thing, and is discussed in [[macros:step pause]]
   * ''Menu.Stack.PushOrReloadMenu("Primary", "Expert.Chases.AppendStep")''  proves what was mentioned earlier: the macro refers to the state the software was in when the macro was recorded. in our example the macro was recorded in the 'Record Chase/Append Step' mmenu, thus ''Expert.Chases.AppendStep''   * ''Menu.Stack.PushOrReloadMenu("Primary", "Expert.Chases.AppendStep")''  proves what was mentioned earlier: the macro refers to the state the software was in when the macro was recorded. in our example the macro was recorded in the 'Record Chase/Append Step' mmenu, thus ''Expert.Chases.AppendStep''
   * the next line ''Menu.InjectInput("OnButtonUp","FaderlessPlaybackSelect.0","StaticPlaybacks",0)'' is somewhat ophane and has something to do with how macros are recorded: the corresponding previous "OnButtonDown" actually triggered recording the macro - and now the key needs to be released again - hence this line is in the macro. I guess it does just nothing - very few actions are performed when a button is released.   * the next line ''Menu.InjectInput("OnButtonUp","FaderlessPlaybackSelect.0","StaticPlaybacks",0)'' is somewhat ophane and has something to do with how macros are recorded: the corresponding previous "OnButtonDown" actually triggered recording the macro - and now the key needs to be released again - hence this line is in the macro. I guess it does just nothing - very few actions are performed when a button is released.
-  * after this we have a series of ''Menu.InjectInput("OnButtonDown"...'' and subsequent ''Menu.InjectInput("OnButtonDown"...'' - again as mentioned earlier, the macro simply records key presses, and [[function:Menu.InjectInput|Menu.InjectInput]] is, by the way, the function to simply feign some input for Titan. The only interesting thing are the buttons which were pressed:+  * after this we have a series of ''Menu.InjectInput("OnButtonDown"...'' and subsequent ''Menu.InjectInput("OnButtonDown"...'' - again as mentioned earlier, the macro simply records key presses, and [[macros:function:menu.injectinput|Menu.InjectInput]] is, by the way, the function to simply feign some input for Titan. The only interesting thing are the buttons which were pressed:
     * ''"NextFixture.0","NoGroup",0'' is ''<Fix+1>''     * ''"NextFixture.0","NoGroup",0'' is ''<Fix+1>''
     * ''"KeypadAt.0","NoGroup",0'' is ''<@>''     * ''"KeypadAt.0","NoGroup",0'' is ''<@>''
Line 147: Line 145:
  
 1. "Next fixture" might work as ''Selection.Context.Global.PatternNext()''\\ 1. "Next fixture" might work as ''Selection.Context.Global.PatternNext()''\\
-2. "at full" is not that easy - we were discussing how to set attribute value the other day\\+2. "at full" needs to be discussed separately - setting an attribute uses the function [[macros:function:Programmer.Editor.Fixtures.SetControlValueById]] and goes along the lines Olie outlined [[http://forum.avolites.com/viewtopic.php?f=21&t=5189|in the forum]]. Another option is literally using ''@@'', by  ''Command.RunCommand("@@")'', see [[:macros:function:Command.RunCommand]] \\
 3. "append step" is the most tricky part: the function could be ''Playbacks.AppendCue(Handle handle)'' - but this would require us to know the handle \\ 3. "append step" is the most tricky part: the function could be ''Playbacks.AppendCue(Handle handle)'' - but this would require us to know the handle \\
 4. "at 0" -> see above 2.\\ 4. "at 0" -> see above 2.\\
Line 158: Line 156:
   * it's always a good idea to know how to program systematically: the [[#manually_recording|first approach]] wouldn't fit for a macro at all   * it's always a good idea to know how to program systematically: the [[#manually_recording|first approach]] wouldn't fit for a macro at all
  
 +~~NOCACHE~~
 +{{page>macros:formats_and_syntax#further_readings}}
 +
 +~~DISCUSSION~~
macros/recorded_vs._coded_macros.1509294262.txt.gz · Last modified: 2017/10/29 16:24 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki