Finding with macros

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
hagrinas
Posts: 4
Joined: Thu Sep 20, 2007 4:38 pm

Finding with macros

Post by hagrinas »

I don't quite get how to use macros with Find. The help seems to indicate that Find will use whatever is currently selected when I record the macro, and that seems to be what is happening. What I can't figure out is how to get it to work with what is currently selected when I invoke the macro.

More specifically, if I have "bob" selected when I start a macro, I want to find "bob:" but it is finding what I specified at record time instead.

How do I do it?
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

TextPad macros hardcode your Find/Replace values. So whatever you recorded is what it will always look for.

I have tried coping a value to the clipboard first, and using a macro that pasted from the clipboard, but when the macro is run, it does not get the current value from the clipboard, it uses the value that was in the clipboard at record time and pasted into the Find field. Macros still cannot be edited either.

Until the Macro tools are changed in TextPad, I would suggest you take a look at Macro Scheduler. http://www.mjtnet.com/macro_scheduler.htm

I use it daily with TextPad, opens TextPad, opens files, parses, does Find/Replace, Saves, closes TextPad and continues with other tasks. You can also call and execute TextPad macros that do work as you intend.
Hope this was helpful.............good luck,
Bob
hagrinas
Posts: 4
Joined: Thu Sep 20, 2007 4:38 pm

Post by hagrinas »

I considered that as an option, though not with Macro Scheduler in particular. At that point, I suppose I would add it to the tools menu? I'll give it a try. It doesn't seem to be a hard thing to code.
Post Reply