Skip to main content
Participant
December 12, 2022
Question

Is it possible to append/group UNDO transaction in ExtendScript/JSX (AI 2020)?

  • December 12, 2022
  • 1 reply
  • 251 views

In the extension I'm developing, an ExtendScript/JSX operation is triggered when user makes adds/changes graphics
after user action, the JSX script copies some paths from one place to another, so far so good.

I am looking for a way to Append the JSX copy operation to the user action ("combined with the preceding transaction"), so that they can be removed with a single undo and appear as a single transaction in the history

I've looked into C++ SDK Undo Suite (sAiUndo), experimented with SetKind and the kAIAppendUndoContext setting, to no effect

I guess this is because the SDK plugin operates in a different context to the "User" context, which in turn is different to the "JSX" context. 

Is there any way to merge these contexts? 

For now I found a workaround, by setting transaction tags (some transactions trigger double undo), but the transaction history remains polluted with the JSX copy operation, I would like this one to be transparent
(basically this is an auto refresh feature)

Thanks!

This topic has been closed for replies.

1 reply

Mylenium
Legend
December 12, 2022

I don't think it's possible as basically just invoking a script already constitutes an undo step. It's a sideffect of the script engines in Adobe apps themselves being extensions already.

 

Mylenium