Paste Progressional Numbers Based on Format Name

Okay, notice that you originally said you wanted "Paste Return Paste". I think I made a mistake and interpreted that as "Return Paste Return." But now that I think about your requirement, I think you just want to alternate between "Paste" and "Return." Please confirm what you want your keystrokes to be, and we will fix this macro. We're almost there. Keep up the faith. It's hard for me to tell what you want, so you have to carefully make note of the key sequence that you want to repeat.

I think that makes sense. What I think you are saying is that you want the sequence to be PASTE, RETURN, PASTE, RETURN, etc.

In that case just remove the first of the two "Type Return Key" actions in the macro with the loop. Try it after you make this fix, and tell me if that solved it.

Response 5: Okay, we are making progress. That kinda makes sense. I think what you need to do here is see if there's a key you can press to "enter edit mode". That would fix the problem if we inserted that into the macro. Another possible solution is for us to remove the prompt window and just hardcode some numbers instead. Which of these solutions would you like to try? They should both work.

P.S. I too am hitting limits on replies because you are in the first 24 hours of using this website. I hope you notice this comment. Maybe we should continue tomorrow?

Either that OR you could use my other suggestion and find a keystroke that turns on the edit mode. Most apps have such a feature.

Whatever works is fine. We can talk more tomorrow when your restrictions are removed.

1 Like

Is it on? 1 2 1 2 testing 1 ey ey. mic check :slight_smile:
Happy to be back

I'm here. Are things okay now?

Well still need to reconfigure the Macro, if I remove the Prompt window, where do I place the LocalRepeat and GlobalResult?

Those are just two variables, which are assigned by the Prompt action.

All you would have to do, if you want to remove the Prompt action, is use the KM action called "Set Variable to Calculation," and assign the values you want to those two variables, using two Set actions.

Maybe set the first value to 3 and the second to 49. Whatever you want. Probably like this:

1 Like

Bingooooo, working!
This is amazing thank you.
Now here is a curve ball, I noticed that if I change the GlobalResult to 00 it will start the numbering at 10 which is great now I understand the way it's calculating it, but if I want the count to start as 010 then 020 ....090 100 110?
Is there a way to add that to the first 9 pastes 010- 090?

Glad you are happy. Now you are asking for leading zeros. Yes, KM has a way to do that. Let me consider which way to use in this case.

Normally, when adding extra functionality, a program gets larger. In this case, our solution actually gets smaller. All you have to do is replace the token "Variable" in your Name_Generator macro with the token "Dec2". That's four less characters, and we solve your problem. I think. But please test it.

Here:

1 Like

Works like a charm this is fascinating, no way I could have figured it myself, it's more like coding not intuitive to the average person, so thank you!

I am trying to understand how this is working, and one of the parts I can't seem to understand is where in the Macro did you tell it to jump by 10s? l only see 1s in the Macro, so I assume thats why we start at 00 or 49 then + 1 we get the 50 so where did you specify to add the 0?
Let's say I want it to jump by actual 1s 001 002 003 or by 5s 005 010 015, what do I change? trying to take control of this Macro :slight_smile:

I read the KM docs for fun. I've never actually used Dec2 before, so you were testing it out for us. Thanks.

In the Name_Generator macro that you made, there's a 0 at the end of the line where you entered "Dec2". That's where the extra zero comes from. When I wrote the macro, my first decision was whether to increment by 10, or increment by 1 and append a zero as I did in that statement. Perhaps I made the wrong decision, but it has worked out anyway.

Does that help you with your problem of changing it to increment by 1 instead of 10? If you can't figure it out, I'm happy to upgrade the macro to increment by some other number.

1 Like

For fun? ha I thought you're working with KM :slight_smile:

Yes that make sense, I just played with it a bit, removed the 0 and it is going up by 1s and then I changed the "GlobalResult+1" to "GlobalResult+5" and it is going up by 5s, I I am getting the hang of it.
The only thing is when I remove the 0 it then missing another leading 0 till you get to 100 ( they are 01 02... 99)

Then replace "Dec2" with "Dec3". Sorry, I didn't think of that in advance. My bad. But I like to make the people I help work a bit. I'm glad you don't mind a little homework.

1 Like

Nailed it again, I think I have full control of the number sequencing if I want to change it.

Now I need to write it down somewhere I can keep it handy.

Thank you Sleepy, this was fascinating, I have plenty more Macros to build :slight_smile:

I'm happy if you're happy. Thanks for tolerating all my erors. :slight_smile:

1 Like