Reply to topic  [ 4 posts ] 
Transform text between ++ to comments 
Author Message

Joined: 2006-10-13 11:26:49
Posts: 64
Hi, im looking for a macro whih transfers a text between ++ symbols to comments. Is there any possibility to achieve this. my text goes something like this

bla bla bla ++explicate this++ bla bla bla

any help?

Yours tom


2010-06-22 04:48:34
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Hi Tom- a macro like that is not too tough. Here's one:
Code:
Select Document Start
While Find Next '\+\+\s*(.+?)\s*\+\+\s*', 'E$'
   Delete
   Add Comment
   Insert Attributed Text $1
   Go to Marked Text
End

That will preserve any formatting applied to the comment text. If you want to strip formatting from the comments, you can change the "Insert Attributed Text" command to just "Insert Text".


2010-06-22 08:48:33
Profile WWW

Joined: 2006-10-13 11:26:49
Posts: 64
Thanks a lot. I have found almost everything I need for the german version, which comes that way.

Select Document Start
While Find Next '\+\+\s*(.+?)\s*\+\+\s*', 'E$'
   Löschen
Kommentar erstellen
   Insert Attributed Text $1
Gehe zum markierten Text
End

I don't know if the question ever arised, but it would be very helpful if the macros wouldn't be language dependent (maybe in a future version?)

Yours,
Thomas

Did I say "Thank you!" - i didn't: shame on me :oops: Thank you, the macro does a perfect job.


2010-06-22 11:19:17
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
I'm glad you got it working (and translated) Thomas.

Yes, it would be much better if one didn't have to translate the menu names in a macro. It's an annoyance we wish didn't exist, but the situation is a little complicated, so I'm not sure you'll see any progress soon.


2010-06-25 09:32:27
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software