• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create callout box around text with arrows

Community Beginner ,
Apr 17, 2018 Apr 17, 2018

Copy link to clipboard

Copied

Hi!

i Dont know were to start but i need to create a javascript for cs5 that create a stacked text  with a box and outline from an existing layer text.

therefor the box need to be dynamic in size Due different texts.

colour(box, stroke,text),font, strokewidth,leading and the worst part is it needs an arrow that melts with box colour and stroke on all 4 sides( the idea is to create an rotated box on the middle of each line (box) that surronds the text and then group them.

TOPICS
Scripting

Views

3.8K

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
Adobe
Community Expert ,
Apr 17, 2018 Apr 17, 2018

Copy link to clipboard

Copied

Please show something

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 ,
Apr 17, 2018 Apr 17, 2018

Copy link to clipboard

Copied

so, the text comes from a simple text in a layer called text,

and this is the graphics I want to make with a script, is it possible?

and more text, wider box, and the arrows or mini boxes is suppose to be in the middle wich I failed with this test.

screen2.PNG

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 ,
Apr 18, 2018 Apr 18, 2018

Copy link to clipboard

Copied

**DISCLAIMER**

This is horrible code. it has lots of room for improvement. But hopefully it will point you in the right direction. If you have any questions at all i'm glad tohelp.

function test()

{

    var valid = true;

    var docRef = app.activeDocument;

    var diamondSize = 10;

    var myTextFrame = docRef.textFrames[0];

    var myRect = docRef.pathItems.rectangle(myTextFrame.top,myTextFrame.left,myTextFrame.width,myTextFrame.height);

    var diamondLeft = docRef.pathItems.rectangle(0,0,diamondSize,diamondSize);

    diamondLeft.rotate(45);

    var diamondTop = docRef.pathItems.rectangle(0,0,diamondSize,diamondSize);

    diamondTop.rotate(45);

    var diamondRight = docRef.pathItems.rectangle(0,0,diamondSize,diamondSize);

    diamondRight.rotate(45);

    var diamondBottom = docRef.pathItems.rectangle(0,0,diamondSize,diamondSize);

    diamondBottom.rotate(45);

    diamondLeft.left = myRect.left - diamondLeft.width/2;

    diamondLeft.top = myRect.top - myRect.height / 2 + diamondLeft.height/2;

    diamondTop.left = myRect.left + myRect.width/2 - diamondTop.width/2;

    diamondTop.top = myRect.top + diamondTop.height/2;

    diamondRight.left = myRect.left + myRect.width - diamondRight.width/2;

    diamondRight.top = myRect.top - myRect.height/2 + diamondRight.height/2;

    diamondBottom.left = myRect.left + myRect.width/2 - diamondBottom.width/2;

    diamondBottom.top = myRect.top - myRect.height + diamondBottom.height/2;

  

}

test();

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 ,
Apr 18, 2018 Apr 18, 2018

Copy link to clipboard

Copied

Thanks a lot, no worry if it’s not the best , i am glad for any reference at all since i don’t understand illustrator library . I will test tomorrow!

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 ,
Apr 18, 2018 Apr 18, 2018

Copy link to clipboard

Copied

Use the appearance panel combined with a paragraph style for getting a editable text box with the wishes arrows. The appearance could be saved as graphic style and used for every new textfeld (do not forget - you also need a paragraph style ! )

Or you can duplicate the textframe and change the text.

Or you can save as symbol and after using the symbol: break link to symbol  for editing the text.

Or creating a new textframe and duplicate the appearance through the (? destination selection ? in German: Zielauswahl ) to the new textframe.

appearance_box_around.png

What ever, you will need 5 minutes for creating the required appearance (see the video):

Create callout box around Illustrator text with arrows

Have fun

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 ,
Apr 18, 2018 Apr 18, 2018

Copy link to clipboard

Copied

wow Brilliant!!

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 ,
Apr 24, 2018 Apr 24, 2018

Copy link to clipboard

Copied

LATEST

johnb36386605  schrieb

Thanks a lot, no worry if it’s not the best , i am glad for any reference at all since i don’t understand illustrator library . I will test tomorrow!

johnb36386605​

Do you have problems with the script- or the appearance-solution? Or do you need further assistance?

Or why you give no feedback?

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 ,
Apr 18, 2018 Apr 18, 2018

Copy link to clipboard

Copied

No script is needed.

You only will need one paragraph style and one grafik style. But I'm not at home in the moment.

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