Macro only executes one of two replace functions

General questions about using TextPad

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

Post Reply
tmpetersen
Posts: 1
Joined: Tue Oct 20, 2009 2:41 pm

Macro only executes one of two replace functions

Post by tmpetersen »

I Created a macro to add ticks around a string of characters on a line (to make a in clause for oracle).
Starts out as zzzzzzzzzzzz
after macro 'zzzzzzzzzzzz',

Macro
Replace from ^ to '
Replace from $ to ',

save macro.
While creating the macro, it properly does the replace on both sides of the string. When I run it from the macro command, only the left side is performed.

Can someone tell me if I need to do something else to get the macro to finish properly.
Tom P.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Make sure that your macro moves the cursor to a "home" position before doing the replacements.

CTL-HOME will usually bring the cursor to the top left of your document.
HOME will usually bring the cursor to the beginning of the line.

--------------------------------------------
Not sure what these macros do ....
Macro
Replace from ^ to '
Replace from $ to ',

What are the actual Search/Replace strings you are using?
Are the chars that need to be surrounded the only chars on the line? Are they at the beginning, the end, or in the middle?

--------------------------------
Hope this was helpful.............good luck,
Bob
Post Reply