Skip to main content
adityas11340664
Participant
October 20, 2016
Question

i have to add some text at cursor point i n indesign

using javascript i have to add some text like "welcome" at the cursor point.

Thanks in advance.

Ce sujet a été fermé aux réponses.

4 commentaires

Skemicle
Inspiring
October 20, 2016

If there is no text highlighted (you just have the flashing 'cursor point' then that can be referenced as the selection..

app.selection[0].contents = "Welcome";

Community Expert
October 20, 2016

If your "cursor point" is a selected text insertion point or selected text then simply do:

app.selection[0].insertionPoints[-1].contents = "Welcome";

But maybe—I'm not sure about that—you want to load text to the placegun?

Then you could create a text document first and load that to your placegun.

Regards,
Uwe

October 20, 2016

var _text = 'Welcome!';

app.activeDocument.textFrames[0].insertionPoints[0].contents = _text;

Peter Spier
Community Expert
Community Expert
October 20, 2016

Moved to the scripting forum....

Skemicle
Inspiring
October 20, 2016

,

You seem to move a lot of posts..

They should make it to where members can choose which forum would best fit their question.

Peter Spier
Community Expert
Community Expert
October 20, 2016

Skemicle wrote:

,

You seem to move a lot of posts..

They should make it to where members can choose which forum would best fit their question.

It's my job as a moderator to move posts to the appropriate forum if, in my judgement, they are not posted in the correct forum initially. Since this post clearly said the intent was to use javascript, and there were no responses, I moved it to the forum where most of the scrip writers hang out.