Back

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

Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • in reply to: Add undo to your script revisited #117289

    It’s alive!
    It works! The big problem was that the params array can’t have any object, only scalar types.
    Theunis, I wish to make you a suggestion, in your web that array is explained in this way:

    any doScript (script: varies[, language: ScriptLanguage=ScriptLanguage.UNKNOWN][, withArguments: Array of any][, undoMode: UndoModes=UndoModes.SCRIPT_REQUEST][, undoName: string=Script])

    withArguments Array of any An array of arguments passed to the script. (Optional)

    I think that must be changed.
    I’m looking for the web where I found that explanation, I just was stacked because the params seems not to arrive to the function until I changed the objects for numbers, and… it worked. But I have it in the other computer. I’ll change and paste here.
    Again, thanks a lot Theunis!

    in reply to: Add undo to your script revisited #117271

    Well, I have time to do more tests, and, how I can see in your web (https://jongware.mit.edu/idcs6js/pc_Application.html#doScript), I must put all params into an array, so the line will be something like that:
    app.doScript(call_funct, ScriptLanguage.JAVASCRIPT, array_of_params, UndoModes.ENTIRE_SCRIPT, “My Undo”);
    The undefined word makes reference to params.
    Ill try now.
    News ASAP.

    in reply to: Add undo to your script revisited #117242

    Thanks!
    I think like you, Python is easy but powerful!!! At first glance, i thinked “No semicolons? No brackets? Indents do all the job??? Kidding me??” But I try it, try a bit more, try one more time and… “S..t, that works really fine!!”. I hope Adobe keep in mind your (our) request.
    I’ll take a look to Textpad (very spartan!) and Sublime Text (edit all appearances of a variable name at once its a feature that I’m looking for in all editors I try). I have used Text Wrangler very few times at home (trying to find some data in hex files, years ago). Now I’m using Notepad++ and Geany (it runs Python natively too in a system console) at work, plus PyCharm Community Edition 2018 (very powerful, but a bit tricky to make python run -for me-) at home.

    Back to my undo problem: only one function do the big stuff, and it’s called in a way like that:
    if (case 1)
    call_funct(list_of_parameters_1)
    else if (case 2)
    call_funct(list_of_parameters_2)
    else
    call_funct(list_of_parameters_3)
    end if
    I’m thinking about something like that:
    if (case 1)
    app.doScript(call_funct(list_of_parameters_1), ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “My Undo”);
    else if (case 2)
    app.doScript(call_funct(list_of_parameters_2), ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “My Undo”);
    and so on, but I dont know if I can put params there, and I havent time today to try it. It’s possible to use app.doScript in this way?

    in reply to: Add undo to your script revisited #117238

    Well, I just tested the code in a 120 line script that creates numbered tab separators.
    After executing it, the UNDO menu displays the text that I have specified in app.doScript() and undoes all the steps (create the pages, add text boxes, insert the numbers and apply the indicated paragraph style) at one time.

    With another shorter script, only 5 lines for convert all variable texts into normal texts and NO UNDO trick, Undo app menu undoes 6 changes at one time, not one by one.

    Maybe the other script is too complex for this feature (it have 600 lines and growing, a palette window with about 15 buttons, 33 functions …), or maybe I’m doing it wrong?

    in reply to: Add undo to your script revisited #117235

    Wow! Jongware in person!!
    The first thing I would like is to thank you for help all us to create better scripts for indesign.
    And by the way, I have also signed your feature request so that indesign can be programmed in python ;) (but with my web alias)
    Here’s the web, if someone else more wish to sign:
    https://indesign.uservoice.com/forums/601021-adobe-indesign-feature-requests/suggestions/32193772-add-python-to-the-list-of-supported-scripting-lang
    Talking again about this particular case, I will try before dinner to incorporate this function into other shorter scripts.
    I will inform you as soon as I have done the tests.
    Thank you a lot for your help, Theunis.

    I’m curious, do you use the Adobe ExtendScript Toolkit to write the scripts or some other editor?
    I use Notepad++ lately because this Adobe app seems terribly limited and limiting to me…

    in reply to: Multipage frame and liquid layout #115842

    Thank you David!
    Well, the way you do covers is the one I do.
    The scripts are very interesting, maybe I’ll try one of them.
    Anyway, the image background covers seems to be ideal for one page spread, better than 5 pages spread like I use now.
    Will see…
    Thanks again!

    Best regards,
    Jose

    in reply to: Multipage frame and liquid layout #115796

    Anybody?
    Anne Marie? David? Mike?

Viewing 7 posts - 16 through 22 (of 22 total)