Skip to main content
Known Participant
January 11, 2023
Answered

Insert object at the beginning of each sentences

  • January 11, 2023
  • 1 reply
  • 319 views

Hi everyone,

Is it possible to insert an object with specific dimension at the beginning of every line of sentences using script?

 

Thank you!

This topic has been closed for replies.
Correct answer Peter Kahrel

You don't need a script. Do this:

1. Place the object somewhere, doesn't matter where.

2. Copy the object to the clipboard

3. Do this GREP replacement:

Find: ^

Change to: ~c

Which reads as 'place the content of the clipboard (~c) at the first insertion point (^) of each paragraph.

This works in CC2022 and later.

In earlier versions you do:

Find: ^(.)

Change to: ~c$1

(thats the digit 1 after the dollar symbol).

P.

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
January 11, 2023

You don't need a script. Do this:

1. Place the object somewhere, doesn't matter where.

2. Copy the object to the clipboard

3. Do this GREP replacement:

Find: ^

Change to: ~c

Which reads as 'place the content of the clipboard (~c) at the first insertion point (^) of each paragraph.

This works in CC2022 and later.

In earlier versions you do:

Find: ^(.)

Change to: ~c$1

(thats the digit 1 after the dollar symbol).

P.

Known Participant
January 11, 2023

@Peter Kahrel you're one of the best! 

 

Thank you so much sir!