How to script Illustrator to insert filename in to textpath?

Hello everybody!
I'm new to the scripting technology, and i wonder if its possible to create a java or apple script to do the following:
We are forced to name our thousands of illu-files on a specific way, that's ok, but: we have to insert the filename as text in to the illustrator-file, so that we can find the file through a hardcopy.
We are doing this manualy and this goes often wrong, so we have to reopen the file, change the text and save and print it again.
Can anybody give me a hint or even better show me a piece of code how to insert the filename of the actual illustrator-file in the active cursor-position.
My thanks!
Regards
Gregor

This snippet of code will add the file's name at the bottom-left corner of the illustrator. You can have this code run on an entire folder of files automatically or change the position\contents of the text.
// CODE BEGIN
var pointTextRef = app.activeDocument.textFrames.add();
pointTextRef.contents = app.activeDocument.name;
pointTextRef.top = 20;
pointTextRef.left = 10;
// CODE END

Similar Messages

  • Insert filename in master slide

    Can somebody tell me how I can insert the filename into the master slide (like you can insert filename in Numberq and Pages) so that when I change my filename it automatically changes also in the master slide ? Many thanks for your help.

    This feature is not available "in thebox"
    You may go to my iDisk:
    <http://idisk.me.com/koenigyvan-Public?view=web>
    and download:
    foriWork:for_Pages:paste_thepath.zip
    It contain two scripts.
    One which pastes the pathname at the Insertion point.
    One which insert the pathname at the end of the document.
    I apologize but at this time I don't know the way to insert at the insertion point
    Yvan KOENIG (from FRANCE lundi 25 août 2008 12:22:02)

  • How can I change the insert SWF File, I need to add a few things and make it better?

    How can I change the insert SWF File, I need to add a few things and make it better? Is there an option inside of the dreamweaver menu that I am not looking at. It would make it easier on me if I changed some things around and didn't have to do it all myself each time I used it. Just incase you was needing to remember what swf flash was, It is not a swf video either.
      <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="480">
        <param name="movie" value="Sonic Kaboom.swf">
        <param name="quality" value="high">
        <param name="wmode" value="opaque">
        <param name="swfversion" value="9.0.115.0">
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="../Scripts/expressInstall.swf">
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="Sonic Kaboom.swf" width="640" height="480">
          <!--<![endif]-->
          <param name="quality" value="high">
          <param name="wmode" value="opaque">
          <param name="swfversion" value="9.0.115.0">
          <param name="expressinstall" value="../Scripts/expressInstall.swf">
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>

    If I understand correctly, Sonic Kaboom.swf needs to be edited in a separate Flash authoring program and then reinserted into your HTML document. 
    As Murray said, Flash is dead.  Nobody uses it anymore.   We use HTML5, CSS3 and JavaScript animations which have universal support from Smartphones, Tablets and other web devices that can't support Flash.   Look at Edge Animate.
    HTML animation | Download free Adobe Edge Animate CC trial
    Nancy O.

  • Inserting filename and page numbers into multiple PDF files?

    Have since seen this thread, BUT still interested in the syntax of the code
    to insert filename and page # into multiple files:
    http://forums.adobe.com/thread/951925?tstart=0
    Good Evening (GMT!)
    I have approx 100 PDFs with one or two pages in each, they are English translations
    of Russian language test certificates and the formatting/feel of the originals is lost in
    the translations. The only real link between the two sources is the "_RUS" and "_ENG"
    filename suffixes and the common leading filenames otherwise. Thus I need to maintain
    a record of the filename in any page I print off, should there be a need to refer back to
    the original if the translation is open to artistic licence.
    I have a script (below) that happily adds a page x/y and filename into the active file,
    what I would like is to be able to do this insertion into multiple files as defined by a
    portfolio or a selection via a select files dialogue box
    I am quite out of my depth now as my past skirmishes with JavaScript have set
    cookies and tweaked a few other browser doodads in webauthoring
    Any help most appreciated on this one...
    Kind Regards
    Dr B
    Southampton
    UK
    NB the filename inserted may be corrupted as a result of my last tweakings
    will sort that one out ASAP....
    ================================
    // SetRemoveFooter
    // Modified as marked
    // Menu item generation
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    //add page x of y
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //=====================================================================================
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = + this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "dd/mm/yyyy"
    var Box2Width = 100
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    //print output?
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    // TEXT SIZE SETTING
    fd.textSize=12; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    // print output?
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    // TEXT SIZE SETTING
    fp.textSize=12; fp.readonly = true;
    fp.alignment="center";
    //==========================================================================
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    will

    Putting this in a batch file within the automation function of Acrobat
    delivers the goods, I need to investigate the formatting of the output to
    get them to line up, have taken the middle ground and gone for a central
    position for the page x/y text...... some lines are redundant
    Dr B
    ===========================================
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
           var fd = this.addField("xftDate", "text", p, [30,15,
    TotWidth-30-30,30]);
           fd.value =  FileNM;
           fd.textSize=12; fd.readonly = true;
           fd.alignment="left";
    var bStart=(0);
    var bEnd=(TotWidth);
           var fp = this.addField(String("xftPage"p1), "text", p,
           fp.value = "Page: " + String(p1) "/" + this.numPages;
           fp.textSize=12;  fp.readonly = true;
           fp.alignment="center";

  • Script Task order by FileName

    I have following code in my script task to get all the files in directory.
    String[] sourceFiles =
    Directory.GetFiles(Dts.Variables["User::FilePath"].Value.ToString(),
    "*.TIF");
    I have files in directory as 1.TIF, 10. TIF, 3.TIF.
    I would like to process my files in following order 1.TIF, 3.TIF, 10.TIF.
    How do i sort it by FileName ascending.
    any help much appreciated.

    If the numeric sorting is necessary then still the same function applies, but you need to extract the numerical portion of the elements of the file names array (the 3,1...), place 'em into a new numeric array and sort it, and then when you operate on the
    elements for processing append the extension (given it is the same for all files, otherwise it becomes tricky).
    Arthur
    MyBlog
    Twitter

  • How to auto-update the field 'filename' after a "Save As..."?

    It is very convenient to have the filename of a document in a header or footer sometimes. At times it is helpful to also include it elsewhere. So I 'Insert / Filename' to insert text fields with the filename as necessary.
    If I change the document and save it with a new name, it is most annoying to have to manually update every place in the document the text field occurs.
    I cannot find where the control(s) is/are to make the update automatic.
    Thanks for any suggestions you can make.
    Pages '09 (version 4.1 (923) )
    MacOS X 10.6.8

    Double click on the inserted filename.
    Click either of the checkboxes in the options window that opens.
    The name will update.
    Click the same checkbox again to toggle that part of the name to the original state.
    Click away from the options window to dismiss it.
    Regards,
    Barry
    PS: Learned this today from the Pages '09 User Guide, a very useful PDF file which you can download via the Help menu in Pages. Thanks for making me look.

  • No longer able to insert filename into a document in the new pages

    Does anyone know if the ability to insert the filename into the document has been eliminated or if we just have to get to it another way? Used to be able to go to INSERT>FILENAME but that seems to have disappeared.
    Thanks
    AJ

    It does cause problems in a number of circumstances.
    In this forum alone, there are several threads with many users who used Setup Assistant or Migration Assistant to transfer their stuff, ended up with lots of duplicate apps because of it, and had great difficulty finding and deleting the duplicates.
    There have also been folks whose apps did't get updated, and Adobe apps that wouldn't run at all.
    Again, it depends on the apps and circumstances.

  • How can I set the insert date to auto update in Pages 5.2.2

    how can I set the insert date to auto update in Pages 5.2.2
    I am attempting to have the date in header auto update in a Pages file.
    I can insert it, but where is the AUTO UPDATE selection
    OS10.9.4
    thank you

    Apple never included the auto-update feature for dates in Pages v5.2.2. You would have to single-click the date, and deliberately update it.
    If you have Pages ’09 v4.3 in /Applications/iWork '09, then it will allow you to configure auto-update of the date field. Right-click on the date, set the format, and click the selection for automatically update on open.

  • How can I get an inserted  video (FLV) in Presenter 7 to stay on the screen once it has finished pla

    How can I get an inserted  video (FLV) in Presenter 7 to stay on the screen once it has finished playing? Right now it disappears once it is done. I'd like it to remain on the screen, or loop if possible, until the user manually moves the presentation forward.

    Hi,
    You may set the slide setting as 'Advance by user'.
    So,
    a. Insert flv on a slide.
    b. On presenter ribbon goto Slide Manager .
    c. Select the slide on which flv is inserted and set Advance by user 'Yes'
    Hope this solves your purpose.
    Thanks,
    Alpi

  • I need a script that copies the filename into the file

    I need a script that copies the filename into 4th column of each line in the text doc file.
    I have over 2000 different file names each containing 6 columns and ~50-100 rows.
    I can do this manually using this script:
    awk '{print $1"\t"$2"t\"$3"\t <name> \t"$6}'
    But I would like an automation command or script. Is there any command that I can use instead of <name> that will copy the filename into the column?
    Thanks
    Monica

    Oops, I forgot the redirect to a file. It's not a good idea to edit files in place. A script could fail and you're left with at least one file ruined. It's better to create new files then delete the old files.
    for file in *; do
        while read col1 col2 col3 col4 col5 col6; do              
            printf "%s\t%s\t%s\t%s\t%s\n" $col1 $col2 $col3 $file $col6
        done < $file > n$file
    done
    You could narrow the files listed such as
    for file in *.tsv
    and redirect the new files to another directory. Such as
    done < $file > /absolute/path/to/directory/$file

  • How to hightlight  the new  inserted data in the last low of JTable?

    Could somebody help me?
    i am doing the e-restaurant application system .
    When press the food button, the JTable will list out the order details.
    When the order is long, the scroll pane will show up.
    My problem is[ b] how to hightlight the new inserted data in the last low of JTable when the food button is press every time?The scroll pane will automatically scroll down the to the new insertted data.
    In the List, i get the effect like this command but in the JTable how?
    list.ensureIndexIsVisible(orderDetails.getSize()-1);
    thank in advance.
    Below is the snapshot of my coding:
    DefaultTableModel model=new DefaultTableModel(cells,columnNames);
    OrderModel sorter=new OrderModel(model);
    JTable table=new JTable(sorter);
    JScrollPane scrollPane=new JScrollPane();
    scrollPane.add(table);
    Object[] object={foodName, "1",price};
    model.addRow(object);
    sorter.fireTableDataChanged();
    sorter.fireTableStructureChanged();

    The right place to ask this one is "Swing Forum.
    http://forum.java.sun.com/forum.jspa?forumID=57

  • Can someone tell me how to access Illustrator CC on the cloud. I currently have CC 2014 but I do not want to use it since it is extremely slow for me.

    Can someone tell me how to access Illustrator CC on the cloud. I currently have CC 2014 but I do not want to use it since it is extremely slow for me.

    The Cloud is a delivery process... you still install the program(s) on your computer, and then pay a subscription fee to use the program(s)
    Cloud Plans https://creative.adobe.com/plans
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html
    -Cloud status check 30-or-99 days https://forums.adobe.com/thread/1549838
    OR buy the 3 year old version which is a one time payment Creative Suite 6

  • How do I get an inserted DVD's icon to display on the desktop.  It did with Snow leopard but won't

    How do I get an inserted blank DVD's icon to appear on the desktop?  It doesn't appear anymore now that I've upgrated to Maverick.  I want to drag photos from iphoto to the disc to burn them.

    Finder >Preferences>Sidebar>CD's/DVD's
    MacBook Pro (15-inch Mid 2012), OS X Mavericks (10.9), i7 500GB 16GB RAM iPhone5 iOS7.0.4

  • How to improve performance of insert statement

    Hi all,
    How to improve performance of insert statement
    I am inserting 1lac records into table it takes around 20 min..
    Plz help.
    Thanx In Advance.

    I tried :
    SQL> create table test as select * from dba_objects;
    Table created.
    SQL> delete from test;
    3635 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    4
    SQL> insert /*+ APPEND */ into test select * from dba_objects;
    3635 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    6
    Cheers, Bhupinder

  • How to write code to insert record in database programtically in Jdev rel

    Hi Experts,
    Please tell me how to write code to insert record in database programtically in Jdev rel .2.
    Thanks
    Shiv Naresh

    To insert the record programmatically i will provide you some sample below
    ViewObject vo = this.getVoXXXX();
    Row vor = vo.getCurrentRow();  // get the current row of the record
    ViewObject vo1 = this.getvoYYYY();
    Row vor1 = vo1.createNewRow(); //creating new row in the table
    vor1.setAttribute("aaaaa",vor.getAttribute("ttttt")) // In this we are getting the current row value of "ttttt" and inserting into "aaaaa"Hope this could help you!

Maybe you are looking for

  • Manually Backup to PC - incl. Voice Memos?

    After reinstall OS and new iTunes - my iPhone data wouldn't transfer to iTunes. I did manual back up (to PC) and I'm about to restore my iPhone. What's very important for me is NOT TO LOSE VOICE MEMOS that are on my iPhone. Are Memos included in manu

  • Getting the below error while using the JMS server.

    <Sep 20, 2010 9:27:43 AM EDT> <Warning> <J2EE> <BEA-160064> <There was an error while making the initial connection to the JMS resource named EMSTopicFactoryNonXA from within an EJB or a servlet. The server will attempt the connection again later. Th

  • Printing to shared printer on Tiger 10.4

    We have an older iMac that has a printer connected via USB (Officejet 6200). It is shared via printer sharing and runs Mac OS X 10.4. The iMac is connected to a Snow (dual Ethernet) Airport base station. I could see it and print to it with 10.5 from

  • Surprise solution to error uploading a book

    Just by chance I stumbled across the (my) solution to this mysterious problem concerning the upload of a book, which always stopped at 64 kb with an error message eventually: First, I used Cocktail to repair permissions and do the routine system main

  • Swiping to go back only works in safari

    Swiping with three fingers to go back or forward was a gesture I used a lot in Snow Leopard. Now its with two fingers, AND it only works in safari. I don't know if this is true, but it seems like there are fewer gestures in Lion than in Snow Leopard.