Copy link to clipboard
Copied
hi .
i want script for copy text of text frame and print text frame in alert.
how select All characters in the text frame.
Copy link to clipboard
Copied
you should ask it here
Copy link to clipboard
Copied
Hi shahriara7551080 ,
how do you like to address your text frame in the document?
Do you like to select the text frame? Or do you know that there is only one text frame in the document? Or on a distinct page? Or does it have a special name or a labelā¦?
Whatever you do to reach the text frame, assign it to a variable.
Let's pretend the variable name is simply textFrame, then you could alert the contents like that using ExtendScript (JavaScript):
// Let's pretend the text frame is selected by the user:
var textFrame = app.selection[0];
alert( textFrame.texts[0].contents );
You really should ask scripting questions here:
Regards,
Uwe
Copy link to clipboard
Copied
This thread moved from InDesign to InDesign Scripting.
Thank you for notify Laubender.
Copy link to clipboard
Copied
first:
i want copy contents text frame
then past to a variable.
second :
I want to put the content (text ) textframe in the textbox c#.
pleas help me.
Copy link to clipboard
Copied
@shahriara7551080 have you find any solution yet...?
Copy link to clipboard
Copied
Hi @ashish25786013lca1 ,
did you try my suggestion from March 2018?
A variation on this:
// ExtendScript (JavaScript) code
// Let's pretend the text frame is selected by the user:
var textFrame = app.selection[0];
var textOfTextFrame = textFrame.texts[0];
// Select the text, not the text frame:
textOfTextFrame.select();
// Copy the selected text to the clipboard:
app.copy();
// Alert the contents of the text:
alert( textOfTextFrame.contents );
Did I miss something?
@shahriara7551080 wasn't very clear what the script should do.
Regards,
Uwe Laubender
( Adobe Community Professional )