1 Reply Latest reply on Jul 18, 2008 2:57 PM by [Jongware]

    Scripting and history.

    GagnonEric Level 1
      It's not much a question or even a complaint.. more of a observation.

      I have been given a feedback this week on a problem that the scripted tools (i bring in production) is creating. They are fully aware of the time (and boring repetitive work) i save them.. but in the end when things works well, what user notice is what is not working (like me here posting about this problem when Indesign really brings a lot to my work! ;)ah! ah!)

      Users (graphist, designers) LOVE the very generous Undo of indesign (i'm not sure if there is a limit?), but using script often make it impossible to go back as some of my more complex script generate alot of action in the history.

      Command-z will only revert the last action that the script did. That make sense to me as a programmer, but not to them because when they use the palette of tool and click on a button (say "adjust xyz"), it's not different to them as using a native align button in Indesign (they would expect the same behavior in both situation: Command-z = back to what the document was before using the button.

      Maybe using the c++ SDK would give a thighter control on how automating operations get recorded in the history??

      Eric
        • 1. Re: Scripting and history.
          [Jongware] Most Valuable Participant
          >Maybe using the c++ SDK would give a thighter control on how automating operations get recorded in the history??

          Absolutely.
          Because Peter Kahrel's original (CS) script for inserting foreign characters ran slower and slower in CS, the more I moved towards the end of a long story, I decided to re-write it in C++ as a proper plug-in. Freebie #1 was it inserted itself into any menu I wanted (I put it in the Type menu). Freebie #2 was it appeared in the Keyboard Shortcut Editor, so I could add a custom shortcut key. #3 was that the edit box to enter a character code in suddenly had developed a memory: it remembered the last one entered, all by itself. And finally (to get to the point :-) ), as the plugin was named "Insert Special Character", the Undo was called "Undo Insert Special Character". All courtesy of the plugin framework!

          (Writing plugins got a bit more complicated in CS2, then even more so in CS3. Fortunately, the scripting engine has been sped up so much I now can use the original script again! But I really miss the extra features the plugin version had.)