Quantcast
Channel: Adobe Community : Discussion List - Illustrator Scripting
Viewing all articles
Browse latest Browse all 3671

Scripting: Prompt a Dialog Box to add text to part of my existing Script.

$
0
0

     I'm new with scripting and haven't had a lot to do with it, so i'm looking for a little help. I need to add to my companies existing Script Pallet, we have a script that creates our art into dies for us. So that they can be used for Debossing/Hotstamping items. But, we need the "Die" to have the Name of the job on it, so i'm trying to get a box to prompt up to add that text to the top of my die...I have got the box to come up but i can't get it to put the text on the art. Am I missing a link somewhere?

 

var newDieName = prompt ('Enter Job Number for New Die', " ","Creating Die");

var newDieName = newDieName.name;

 

            var die_num = thisDoc.textFrames.add();

            die_num.contents = "DJ" +(newDieName)+ ".01" + "-" + " " +magThick;

            die_num.moveToBeginning(rec_group1);

       

    var myParagraph = die_num.paragraphs[0];

            myParagraph.characterAttributes.size = 12;

            myParagraph.characterAttributes.textFont=app.textFonts.getByName("MyriadPro-Regular");

            myParagraph.characterAttributes.fillColor = orange;

       

//  Determines where the die number should be placed.

     die_num.top = -170;

     die_num.left = -54;

     die_num.filled = true;

     die_num.rotate(180);

     die_num.overprintFill = false;

//  End of die number creation

;

 

Please let me know if you need any other information; i will see want i can do to.


Viewing all articles
Browse latest Browse all 3671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>