• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

script for print (show) text of text frame on the alert

Community Beginner ,
Mar 01, 2018 Mar 01, 2018

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.

TOPICS
Scripting

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 02, 2018 Mar 02, 2018

Copy link to clipboard

Copied

you should ask it here

InDesign Scripting

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2018 Mar 02, 2018

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:

InDesign Scripting

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2018 Mar 02, 2018

Copy link to clipboard

Copied

This thread moved from InDesign to InDesign Scripting.

Thank you for notify Laubender.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 02, 2018 Mar 02, 2018

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

@shahriara7551080 have you find any solution yet...?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

LATEST

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 )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines