Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • Marcin Ploch
    Member

    Thank You Peter,
    I’ m learning Indd ObjectModel and java scripting every day.
    I’ve started my adventure with programming two weeks ago, so there is very long way to travel …
    I try to use excellent object-model viewer by Gregor Fellenz.
    I’ve started to read his very interesting book too. Unfortunetly it is only in German so it is extremely tiring.
    In addition I’m trying to learn how to use Data Browser in ESTK. It is really insructive :-)

    Regards
    Marcin

    Marcin Ploch
    Member

    Construction as below solves my problem :-)

    var SysFolder = Folder.selectDialog();

    var SaveFolder = SysFolder;
    var SaveName = SaveFolder + “/” + “000_” + PlikiXML[0].name.slice(19,-24) + “_” + PlikiXML[0].name.slice(4,15) + “.indd”;
    doc.save (File(SaveName));

    Marcin

    Marcin Ploch
    Member

    Thank You Peter for the answer.
    Your code works nearly perfect for for my need.
    But there is one more thing ….

    I want Indesign to write a file to a Folder which I’ve chosen during opening a xxxxx.INDT
    Indesign KNOWS the path because alert from this line returns the right value of var SysFolder which is probably a string:

    var SysFolder = Folder.selectDialog(); alert(SysFolder)

    also I’ve made such variables:

    var PlikiIndt = SysFolder.getFiles(“*.indt”); //alert(PlikiIndt[0].name);
    var PlikiXML = SysFolder.getFiles(“*.xml”); //alert(PlikiXML[0].name);

    to save a file name I made another variable:

    var SaveName = “000_” + PlikiXML[0].name.slice(19,-24) + “_” + PlikiXML[0].name.slice(4,15) + “.indd”; alert(SaveName);
    doc.save (File(“/Users/marcinploch/Desktop/TEST” + SaveName));

    finaly indesign writes proper file name but in folder described by given string.

    The question is how to use path from SysFolder variable ??

    Regards
    Marcin

    in reply to: FIT TextFrame to it's Contents by Java Script #81033
    Marcin Ploch
    Member

    @Keith,
    You are absolutely right :-), I was thinking about “handles”. It is also because of my imperfection in english. On the other hand in my country we use polish word very similar in meaning to “an anchor” to describe a frame “handle”.

    Marcin

    in reply to: FIT TextFrame to it's Contents by Java Script #81026
    Marcin Ploch
    Member

    Thank You Peter for the answer. This is exactly what I need :-)

    many thanks :-)

    Marcin

    Marcin Ploch
    Member

    Many thanks Keith and Mike :-)
    You answers helped me a lot !!!

    Best regards
    Marcin

    Marcin Ploch
    Member

    Hi, write me please your e-mail. I’ll send you a zipped script which works on both platforms OSX and Win
    regards
    marcin

    in reply to: Validate XML structure using existing DTD by javascript #67675
    Marcin Ploch
    Member

    In general, I need a startup script which call “validate from root element” function

    Marcin Ploch
    Member

    Hi, my friend helped me to realize that web browser changed “–” to “-” long style.

    After that change script works PERFECT !!!

    Thanks a lot again :)))

    Marcin Ploch
    Member

    If I delete “-” after “l” debugging goes OK, script starts and works til I try to choose destination style.

    Marcin Ploch
    Member

    Thank You John ad Colin for help. I’m tryingg to use the script but i found some syntax problems. I’m not familiar with scripting :(

    Adobe script edithor stops here:

    while(l–

    and I don’t know why :(

Viewing 11 posts - 1 through 11 (of 11 total)