Let me begin by expressing my gratitude to all the techies on this forum who have helped me in the past. I consider myself a power user, but NOT a programmer. I do, however, like to learn something new when I can immediately apply it to the task at hand. Thus, this most recent post.
I have written a rather clunky KM macro to use in PDF Expert for redacting my account numbers from my bank statements, and it seems to work. But I would love to see it get turned into more elegant language. Specifically, I would like to create a loop within this macro that will accomplish the same thing that the macro does already. There are seven separate redactions that it performs on my credit card statement, one for each account number in its various formats. (In some cases, it finds and redacts one number, in others it redacts several occurrences of an account number. Sorry for getting into the weeds.)
Essentially, I would like to have a macro that expresses only once the action to be performed and then perform it on the various account numbers. One caveat: when opening a new document to be redacted, the REDACT function has to be activated before the first FIND. Then a “FIND AND REDACT button needs to be clicked followed by another button, BLACKOUT ALL. Once these actions are performed, all remaining redactions can be done by just clicking the BLACKOUT ALL button (as per the attached macro file, which, I repeat, does work).
- Redact the Account numbers - Corp Visa copy Macro (v11.0.3)
1. Redact the Account numbers - Corp Visa copy.kmmacros (196 KB)
Finally, (and this does apply to this post) as I poke around in Keyboard Maestro, I see within the action, INSERT TEXT “” BY PASTING, the phrase, INSERT TOKEN. When I click on that little drop-down I am presented with a plethora of choices, the most obvious one being “VARIABLE”. Boy, oh boy, would I like to learn about tokens! Variables, yes, but TOKENS! What are these magical things? I know they have to do with loops and things like that, but I am afraid I have forgotten most of my algebra. Sorry, please don’t laugh (by the way, I am 74).
Once again, I am always very grateful for the help I have received on this forum. And many thanks ahead of time for this one. I know that I will be able to apply to future situations what I learn here in this post.