Can macros edit the content of other macros?

I know macros can move and copy macros, but I was trying to make a macro that can add an additional ‘next’ command to a macro when a different macro runs in order to make a makeshift counter. Can’t find any syntax that successfully selects a macro, presses the edit softkey, and types in a new command, can’t work out why. Any help appreciated

Parents
  • I've not tried to edit a macro with a macro but a technique you can use is to use a macro to hold a value which you reference in other macros and then copy macro's that just hold other values into that macro based on its value.

    eg if you setup macro 101 with the value 2 in it and 102 with the value 3 and so on and then useed  macro 200 for the counter with the initial value 1 

    then you could have a macro

    copy macro 1 0 macro button 200 to macro 200

    first time that runs it copies macro 101 which has a value 2 into macro 200

    second time it runs it copies macro 102 with value 3 into macro 200 

    (obviouly you can make the count loop back round by having say macro 108 have 1 in it - and as written above if you wanted to go over 9 you'd need to setup macro 1010 1011 etc - obviously depending on what you want to do with the result you could put 0 1 in the macro rather than 1 and then the range of macros could be continuos from 100 to 199)

Reply
  • I've not tried to edit a macro with a macro but a technique you can use is to use a macro to hold a value which you reference in other macros and then copy macro's that just hold other values into that macro based on its value.

    eg if you setup macro 101 with the value 2 in it and 102 with the value 3 and so on and then useed  macro 200 for the counter with the initial value 1 

    then you could have a macro

    copy macro 1 0 macro button 200 to macro 200

    first time that runs it copies macro 101 which has a value 2 into macro 200

    second time it runs it copies macro 102 with value 3 into macro 200 

    (obviouly you can make the count loop back round by having say macro 108 have 1 in it - and as written above if you wanted to go over 9 you'd need to setup macro 1010 1011 etc - obviously depending on what you want to do with the result you could put 0 1 in the macro rather than 1 and then the range of macros could be continuos from 100 to 199)

Children
No Data
Related