Hi,
For a huge number of text chunks within the current file, I wrote a macro that saves each of them within a new file. For each new file created, the name must match the clipboard contents a the moment of the 'SaveAs' operation (F12).
It works fine for the first created file, but the problem is that all the subsequent files take the same name as the first one, overwriting each other. Obviously, at the moment of the macro recording, the string contained in the clipboard has been hardcoded instead of the 'CTRL+V' sequence.
Is there an escape sequence or something else that I could use instead of 'CTRL+V' in order to get a dymanic paste at the macro runtime?
Dynamic clipboard paste within a macro
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
My experience with TextPad macros says NO.
Copy/Paste clipboard values are hard coded into the macros.
This is a technique that may/may not work for you .... make two macros.
The first one ends, you manually do the paste, then start a second macro that continues from that point.
The technique works, but it probably OK for infrequent, small quantity of actions. If you have multiple things to do, then this will be too much work.
I highly recommend using Macro Scheduler for all macros vs. using the TextPad macros. A big advantage is the ability to edit them. I use it with TextPad, and in some instances I use it to call a TextPad macro and continue.
Macro Scheduler info at http://www.mjtnet.com/macro_scheduler.htm
Copy/Paste clipboard values are hard coded into the macros.
This is a technique that may/may not work for you .... make two macros.
The first one ends, you manually do the paste, then start a second macro that continues from that point.
The technique works, but it probably OK for infrequent, small quantity of actions. If you have multiple things to do, then this will be too much work.
I highly recommend using Macro Scheduler for all macros vs. using the TextPad macros. A big advantage is the ability to edit them. I use it with TextPad, and in some instances I use it to call a TextPad macro and continue.
Macro Scheduler info at http://www.mjtnet.com/macro_scheduler.htm
Hope this was helpful.............good luck,
Bob
Bob
Did it using an awk script
Hi Bob,
Forecasting the dead-end, I wrote a tiny AWK script and ran it on a Linux box. It worked well and ligthning fast! 8)
Thank you anyway for taking care. It's well appreciated.
Forecasting the dead-end, I wrote a tiny AWK script and ran it on a Linux box. It worked well and ligthning fast! 8)
Thank you anyway for taking care. It's well appreciated.
I was having the same problem as bleblanc and also I have been frustrated by the inability to edit macros. So thank you Bob.Bob Hansen wrote:I highly recommend using Macro Scheduler for all macros vs. using the TextPad macros. A big advantage is the ability to edit them. I use it with TextPad, and in some instances I use it to call a TextPad macro and continue.
Macro Scheduler info at http://www.mjtnet.com/macro_scheduler.htm