Copy text and paste in another program with ascending number

Depends what you mean.

If it's "I want to paste a text snippet with two chunks of text, both with the same incrementing number added, every time I run the macro" just add to your existing "Insert...". So:

Line%Variable%Global_indexNumber%%Tab%Index-%Variable%Global_indexNumber%

...would give you

Line0001<tab>Index-0001

If it's "I want to paste in two text snippets in different places, both with the same incrementing number added, every time I run the macro" then just add actions to set the context for your second paste then use the "Insert text" action as before, changing the boilerplate text to suit.

If it's "I want to paste in two separate things, using separate macros" you use the same Global_indexNumber in both but pick one the macros to do the incrementing -- which one will depend on your workflow.

If it's "I want to paste in some text with an index that increments independently" then you'll need a different Global to keep that value in, maybe Global_indexNumberA in the first macro and Global_indexNumberB in the second.

1 Like