Changes to the order of a subroutine's input parameters will also change their order in any existing subroutine callers. Be sure to update these callers so that their parameters and values correspond.
To help with this, @_jims has cleverly created two companion macros that can be found HERE.
Usage:
While editing your subroutine, or with it selected in the Editor's Macros list, trigger this macro. A prompt will appear:
You can now drag-and-drop the parameters up and down within the prompt and click OK to submit it. The selected macro will be replaced with your newly rearranged version. If you change your mind, just use KM's Undo feature (press βZ twice).
Changes to the order of a subroutine's input parameters will also change their order in any existing subroutine callers. Be sure to update these callers so that their parameters and values correspond.
Trigger this macro. The selected action will not be changed; instead a new Execute a Subroutine action, with parameter values correspondingly reordered, will be inserted immediately above the selected action.
After confirming that the new action is as expected, manually delete the original Execute a Subroutine action.
Repeat this process for all calls to the reordered subroutine.
Use the Purge checkbox to delete any reorder information that no longer needed.
If you'd like to test the reorder process, here's a file that contains two subroutine macros (Sub_Example1; Sub_Example2) and two callers (Sub_Example1 π€π’πππ¦π³; Sub_Example2 π€π’πππ¦π³) .
The latest version of Reorder Subroutine Parameters is required; it saves the reorder information in a dictionary that is used in the two macros above.