Results 1 to 14 of 14

Thread: Nested Macros

  1. #1
    Registered User
    Join Date
    Jan 2018
    Location
    Winter Park
    Posts
    167

    Nested Macros

    I believe I have read on here before where people have macros that call other macros.

    I setup a new macro and called other macros by using the control surface. I notice that it brought in 3 commands:

    surface_macro_changed - true
    surface_macro - the button assigned
    surface_macro_changed - false

    doing a text search through the Automation and Integration guide didn't yield any hits to better explain that the first and last bit are doing and if this is the best way to call a macro from a macro.

    Thanks guys!

  2. #2
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    18,833
    There are lots of undocumented shortcuts, but really the intention of leaving them undocumented is that they are pretty much irrelevant aside from special cases that they were implemented for. To run a macro by name, I would usually use he shortcut play_macro_byname.
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  3. #3
    They best way to do this is to use the 'play_macro_byname' shortcut.

    Create a new macro, for the shortcut type in 'play_macro_byname' then in the value column enter the exact name of the macro you want to run.
    Kane Peterson
    Key Accounts Sales Engineer
    NewTek, Inc.

  4. #4
    Registered User
    Join Date
    Jan 2018
    Location
    Winter Park
    Posts
    167
    Thank you both for pointing me in the right direction. I would love to see all the extra little features to see what I could come up with ;-) I will put autocomplete into the wish list as I build these things out. Very powerful stuff.

  5. #5
    Registered User
    Join Date
    Jun 2012
    Location
    Europe
    Posts
    172
    Can't wait the day we'll be able to activate/desactivate a macros folder through another macro.... would be very useful.

  6. #6
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    18,833
    It's coming: macro_is_enabled_byname (but I think you knew that)
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  7. #7
    Registered User
    Join Date
    Jun 2012
    Location
    Europe
    Posts
    172
    Quote Originally Posted by SBowie View Post
    It's coming: macro_is_enabled_byname (but I think you knew that)
    No, I did not, good news ! Is it already working in recent versions ?

  8. #8
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    18,833
    Quote Originally Posted by doctorsunshine View Post
    No, I did not, good news ! Is it already working in recent versions ?
    Oh, sorry! The request originated in Switzerland, so I jumped to a conclusion ... silly me.

    I tested it in today's build of 7-0, and it works, but I haven't tried either 6-0 or the current release version. Here's the syntax, if you want to give a go:

    macro_is_enabled_byname | macro_name="name of macro" | is_enabled="true"
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  9. #9
    Registered User
    Join Date
    Jun 2012
    Location
    Europe
    Posts
    172
    Ha you might be right, I made a feature request for that some time ago. But I did not get feedback it was coming...

  10. #10
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    18,833
    I'd be interested in one or two practical examples of how you envision taking advantage of this ability, if you feel like bothering.
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  11. #11
    Registered User
    Join Date
    Jan 2018
    Location
    Winter Park
    Posts
    167
    If you mean the calling macros from macros,

    I have a number of macros that fire around doing some replay stuff and at the moment they are based around time. For volleyball we do a 6 second replay after points so I want things to happen prior and then wait 6 seconds and fire off again. When I goto soccer that changes out to 10 seconds. I can either duplicate my macros and have one for soccer and one for volleyball and enable the right set. My thought was to have the delay to return graphics etc inside a single macro and that way I could update 1 macro (the wait) and it would impact all 4 of my replay macros without having to edit each one.

    With that being said I did start playing with Automation last night and for show on reply I was able to just put the return of graphics in its own macro that I call when DDR2 leaves program which works really nicely. The only part Im trying to figure out now is that I have a replay that is setup on an ME with a PiP so I can still show live action. The issue I found is that the MEs do not appear to have an automation tab for some reason. As such I cannot set that one to bring the graphics back up when ME1 leaves program.

  12. #12
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    18,833
    Thanks, but actually I was referring to the enabled/disabled toggle ... sorry I didn't make that more obvious.
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  13. #13
    Registered User
    Join Date
    Jan 2018
    Location
    Winter Park
    Posts
    167
    I figured, I just wanted to talk :-p

  14. #14
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    18,833
    It''s always quiet in here on Fridays ...
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •