Hi,
I could not find an awnser using the search option on this forum so I'll just ask the question here (sorry if it was asked before).
Since I upgraded from the nice old green-textpad to this blue version I'm experiencing problems in using simple macro's.
For example I've got a list of coordinates like this:
1000 123456.789 123456.789 1.2341000
1001 123456.789 123456.789 1.2341001
etc.
I want to change that to:
1000 123456.789 123456.789 1.234 1000
1001 123456.789 123456.789 1.234 1001
etc.
So I record a maco as followed:
-I put the cursor on the first line
-start the macro recorder
-press home
-use arrows to go to the place where I want to put the extra spaces
-place the extra spaces
-use arrow to move the cursor one line down
-end the macro recorder
(Pretty crude macro he? But I'm just a simple user, so for me this was a high tech macro)(I know, using the box-selector does the job also, but this is just an example)
Now I start the macro, using the "repeat through end of file" option.
Now when the macro executes it halts every 8th line or something, than hangs for a minute and then executes another 8 lines, and so on.
With the green textpad this problem was not there and the macro executed throughout the file in notime. It's not a computer problem, I've had this problem on multiple computers of diferent configurations.
Hope sombody can help me with this.
Thanks, Mark
slow macro
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: slow macro
I think he means V3 (which had a Green T logo) vs. V4 (Cyan logo) ...
Re: slow macro
Yep, that's what I meant, green versus cyan logo; version 3 versus version 4.
Have non of you had this macro problem?
Mark
Have non of you had this macro problem?
Mark
Re: slow macro
Btw, why use a macro?
a regex replacement could do the same:
replace
\(....\)$
by
\1
a regex replacement could do the same:
replace
\(....\)$
by
\1
Re: slow macro
Ok, as this forum does not allow the pre tag:
replace by space followed by \1
replace by space followed by \1
Re: slow macro
Here's a version of Andreas's Regular Expression (regex) which allows you to indicate the column number after which a space should be inserted. Your example in the original posting indicated column 32, so:
Find:::: ~^\(.\{32\}\)~<br>
Replace: ~\1 ~<br>
(Copy the text between the tilde's (~), but do not include them.)
Before hitting "Replace All" sure to put a checkmark in the "Regular Expression" box.
-- Oh, and I understand the pride you feel for recording your macro. It ain't easy since you have to start over if you mess up. For changes like these, you'll find regex a better tool (a) because as you gain experience with regex you'll be able to accomplish a lot more in less time, and (b) macros (IMHO) gain you little, if any, increase in utility -- for this sort of requirements.
Good luck,
Roy
Find:::: ~^\(.\{32\}\)~<br>
Replace: ~\1 ~<br>
(Copy the text between the tilde's (~), but do not include them.)
Before hitting "Replace All" sure to put a checkmark in the "Regular Expression" box.
-- Oh, and I understand the pride you feel for recording your macro. It ain't easy since you have to start over if you mess up. For changes like these, you'll find regex a better tool (a) because as you gain experience with regex you'll be able to accomplish a lot more in less time, and (b) macros (IMHO) gain you little, if any, increase in utility -- for this sort of requirements.
Good luck,
Roy
Re: slow macro
Hi All,
Hmm,. I'm a bit embaressed now.
I schould have installed the latest version before posting my question. I installed TP 4.4.2 now and it does not have the described problem.
TP 4.1 which I was using before did however have that problem. So It probably was some sort of glich in the Macro-engine. Although I checked the "wat's changed" list and it was not mentioned.
Anyway my problem is solved. And thanks to you guys I'm now introduced to the 'replace regular expression' command, which seems a really handy tool.
Thanks for the help.
Mark
Hmm,. I'm a bit embaressed now.
I schould have installed the latest version before posting my question. I installed TP 4.4.2 now and it does not have the described problem.
TP 4.1 which I was using before did however have that problem. So It probably was some sort of glich in the Macro-engine. Although I checked the "wat's changed" list and it was not mentioned.
Anyway my problem is solved. And thanks to you guys I'm now introduced to the 'replace regular expression' command, which seems a really handy tool.
Thanks for the help.
Mark